joyce8/EMBER2024-capa huggingface dataset:
Function at 0x481c30
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x108
mov eax, dword [0x4aa6e8]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push eax
call fcn.00438e0f
add esp, 4
mov byte [ebp - 0x108], 0
test eax, eax
je 0x481c94
push 0x104
lea ecx, [ebp - 0x108]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
cmp byte [ebp - 0x108], 0
je 0x481c94
lea eax, [ebp - 0x108]
push eax
call dword [0x4abb60]
add esp, 4
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00421639
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
xor ecx, ebp
xor eax, eax
call fcn.00421639
mov esp, ebp
pop ebp
ret

Function at 0x481cb0
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
pop ebp
jmp fcn.00481c30
Function at 0x487030
Capabilities:
Hash data with md5
Initialize hashing via wincrypt

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 8]
push 0xf0000000
push 1
push 0
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x487062
lea eax, [esi + 4]
push eax
push 0
push 0
push 0x8003
push dword [esi]
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
pop esi
pop ebp
ret

Function at 0x4871e0
Capabilities:
Get hostname

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 0xc]
push edi
mov edi, dword [ebp + 8]
push esi
push edi
mov byte [edi], 0
call dword [sym.imp.WS2_32.dll_gethostname]
mov byte [edi + esi - 1], 0
test eax, eax
jne 0x487213
push 0x2e
push edi
call fcn.0042e170
add esp, 8
test eax, eax
je 0x487211
mov byte [eax], 0
xor eax, eax
pop edi
pop esi
pop ebp
ret

Function at 0x4890f0
Capabilities:
Authenticate hmac
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push esi
mov esi, dword [ebp + 8]
push edi
mov ecx, dword [esi + 0xc]
mov eax, dword [esi + 0x14]
lea eax, [eax + ecx*2]
add eax, 0xc
push eax
call dword [0x4abb54]
mov edi, eax
add esp, 4
test edi, edi
jne 0x48911d
pop edi
pop esi
mov esp, ebp
pop ebp
ret
lea ecx, [edi + 0xc]
mov dword [edi], esi
mov dword [edi + 4], ecx
mov eax, dword [esi + 0xc]
add eax, ecx
push ebx
mov ebx, dword [ebp + 0x10]
mov dword [edi + 8], eax
cmp ebx, dword [esi + 0x10]
jbe 0x489164
mov eax, dword [esi]
push ecx
call eax
mov eax, dword [esi + 4]
push ebx
push dword [ebp + 0xc]
push dword [edi + 4]
call eax
mov eax, dword [edi + 8]
add eax, dword [esi + 0xc]
push dword [edi + 4]
mov dword [ebp - 4], eax
push eax
mov eax, dword [esi + 8]
call eax
mov ebx, dword [esi + 0x14]
add esp, 0x18
mov dword [ebp + 0x10], ebx
jmp 0x48916a
mov eax, dword [ebp + 0xc]
mov dword [ebp - 4], eax
push dword [edi + 4]
mov eax, dword [esi]
call eax
push dword [edi + 8]
mov eax, dword [esi]
call eax
mov eax, dword [ebp + 0x10]
add esp, 8
xor ebx, ebx
test eax, eax
je 0x4891ca
mov ebx, dword [ebp - 4]
mov dword [ebp - 8], eax
lea ebx, [ebx]
movzx eax, byte [ebx]
xor al, 0x36
mov byte [ebp + 0xb], al
push 1
lea eax, [ebp + 0xb]
push eax
push dword [edi + 4]
mov eax, dword [esi + 4]
call eax
movzx eax, byte [ebx]
xor al, 0x5c
mov byte [ebp + 0xb], al
push 1
lea eax, [ebp + 0xb]
push eax
push dword [edi + 8]
mov eax, dword [esi + 4]
lea ebx, [ebx + 1]
call eax
add esp, 0x18
dec dword [ebp + 0x10]
jne 0x489190
mov ebx, dword [ebp - 8]
cmp ebx, dword [esi + 0x10]
jae 0x4891f7
nop
mov eax, dword [esi + 4]
push 1
push 0x4a2b32
push dword [edi + 4]
call eax
mov eax, dword [esi + 4]
push 1
push 0x4a2b33
push dword [edi + 8]
call eax
inc ebx
add esp, 0x18
cmp ebx, dword [esi + 0x10]
jb 0x4891d0
pop ebx
mov eax, edi
pop edi
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x484cdc
Capabilities:
Encode data using xor

Disassembly:
mov ebx, 0x484a08
add eax, 0xbb504b35
call fcn.00484d19
sub edx, edx
xor dword [ecx], ebx
sub eax, edx
mov eax, 0x4c9dbcaa
add ecx, 2
inc eax
sub edx, edx
cmp ecx, edi
jl fcn.00484cdc
dec edx
sub edx, 0x869c8642
ret
Function at 0x40279c
Capabilities:
Generate random numbers using the delphi lcg

Disassembly:
imul edx, dword [0x40c02c], 0x8088405
inc edx
mov dword [0x40c02c], edx
mul edx
mov eax, edx
ret

Function at 0x4042e8
Capabilities:
Encode data using xor

Disassembly:
mov edx, 0x3bb9c125
xor edx, 0x5ad2637f
push edx
mov ebx, 0xb540eb8
xor ebx, 0x43dbf90f
pop ecx
xor ebx, ecx
add esp, 0xfffffffc
mov edx, esp
mov dword [edx], ebx
mov ebx, 0x6060050
mov ecx, 0x48908182
xor ebx, ecx
mov edx, 0x3f221f90
mov edi, 0x7bd88410
xor edi, edx
xor edi, ebx
pop eax
xor edi, eax
mov esi, 0x3e732416
mov edx, 0x3e33f596
xor edx, esi
mov eax, edx
dec eax
mov edi, dword [eax + 1]
mov esi, edi
sub esi, 0x60
mov edx, dword [esi + 0x60]
mov eax, edx
push 0x311cc371
mov edi, 0x66f35f44
pop eax
xor edi, eax
push edi
mov edi, 0x456c0cfe
mov ecx, 0x13029bd0
xor ecx, edi
pop esi
xor ecx, esi
push 0x71b22945
mov ebx, 0x5abc7bf7
pop esi
xor ebx, esi
push ebx
mov eax, 0x17d15465
mov edx, 0x3c97d6f7
xor edx, eax
pop edi
xor edx, edi
xor ecx, edx
mov esi, 0
mov edi, 0
xor esi, edi
xor esi, ecx
xor edx, edx
add edx, esi
or edx, 0
jne 0x403f0d
xor eax, 0x30040c0
mov word [0x40c3dc], 0
mov word [0x40c3ec], 1
call fcn.0040285c
mov eax, 0x40c038
mov edx, 0x404398
call fcn.00403c25
mov eax, 0x40c204
mov edx, 0x404398
call fcn.00403c25
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x404391
ret

Function at 0x40520c
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff00
push ebx
push esi
mov esi, ecx
mov ebx, dword [ebp + 8]
push pe_nt_image_headers32
lea ecx, [ebp - 0x100]
push ecx
push edx
push eax
call sub.kernel32.dll_GetLocaleInfoA
test eax, eax
jle 0x405245
mov ecx, eax
dec ecx
lea edx, [ebp - 0x100]
mov eax, ebx
call fcn.00403278
jmp 0x40524e
mov eax, ebx
mov edx, esi
call fcn.0040322c
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4

Function at 0x405258
Capabilities:
Get geographical location

Disassembly:
push ebx
push esi
push edi
push ecx
mov ebx, ecx
mov esi, edx
mov edi, eax
push 2
lea eax, [esp + 4]
push eax
push esi
push edi
call sub.kernel32.dll_GetLocaleInfoA
test eax, eax
jle 0x405279
mov al, byte [esp]
jmp 0x40527b
mov eax, ebx
pop edx
pop edi
pop esi
pop ebx
ret
Function at 0x4062da
Capabilities:
Encode data using xor

Disassembly:
add byte [eax], al
add byte [ecx], dh
fnstcw word [edx - 4]
add esp, edx
mov dword [esp], ecx
mov edi, 0x3f6fa3fd
xor edi, 0xf2628d3
push edi
mov edx, 0x230c0005
mov edi, 0x4f26aaa
xor edx, edi
pop esi
xor edx, esi
mov edi, edx
push edi
mov esi, 0x186d3e21
xor esi, 0x4f136159
push esi
mov ebx, 0x4001ae68
mov esi, 0x880091
xor ebx, esi
pop edx
xor ebx, edx
pop ecx
xor ebx, ecx
push ebx
pop edx
mov esi, edx
push esi
call eax
pop esi
mov ebx, 0x513961a2
mov ecx, 0x51396382
xor ecx, ebx
mov eax, 1
mov edi, 0
xor eax, edi
xor ecx, eax
mov edx, pe_nt_image_headers32
mov esi, 0
xor edx, esi
mov ebx, 4
mov esi, 0
xor ebx, esi
xor edx, ebx
xor ecx, edx
mov edi, 0x10211251
mov ebx, 0x428600ac
xor edi, ebx
mov edx, 0x8512113
mov eax, 0x5ab6737e
xor eax, edx
xor eax, edi
mov edx, 0x6a81090
mov ebx, 0x50460604
xor edx, ebx
mov esi, 0x6682091
mov edi, 0x50861620
xor esi, edi
xor esi, edx
xor eax, esi
mov ebx, 0x277a9f4c
xor ebx, 0x15871e2d
push ebx
mov edi, 0x20340228
mov ebx, 0x48028002
xor edi, ebx
pop esi
xor edi, esi
mov esi, 0x5b468a68
xor esi, 0x11d1da3d
mov edx, 0x2f52e43
xor edx, 0x12e9f188
xor edx, esi
xor edx, edi
mov ebx, 0x2abb7a04
xor ebx, 0x2abb7a04
xor ebx, ecx
xor esi, esi
add esi, ebx
mov edi, 0xfffffffc
add esp, edi
mov dword [esp], esi
mov edi, edx
add esp, 0xfffffffc
mov dword [esp], edi
pop ebx
mov edi, 4
sub esp, edi
push esp
pop esi
mov dword [esi], ebx
xor ecx, ecx
mov cl, byte [eax]
add edx, ecx
mov cl, byte [edx]
mov esi, 0
xor esi, edx
mov edi, esi
add esp, 0xfffffffc
mov dword [esp], edi
pop ebx
add ebx, edx
pop edx
mov byte [eax], cl
mov esi, 1
sub eax, esi
pop ecx
mov esi, 0x1d506dd5
xor esi, 0x1d506dd4
sub ecx, esi
mov ebx, ecx
sub ebx, 0
jne 0x4063ce
mov ecx, 0x2411a68
mov edx, 0x100092
xor ecx, edx
push ecx
push 0x64954f50
mov eax, 0x3d8ea386
pop esi
xor eax, esi
pop ebx
xor eax, ebx
push 0x3aee1aa6
mov ebx, 0x4d53785f
pop edx
xor ebx, edx
mov edi, 0xc110844
mov ecx, 0x20a6c100
xor edi, ecx
xor edi, ebx
xor edi, eax
call edi
pop edi
pop edi
ret

Function at 0x4069dc
Capabilities:
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push 0
push ebx
push esi
push edi
mov ebx, eax
xor eax, eax
push ebp
push 0x406a24
push dword fs:[eax]
mov dword fs:[eax], esp
lea edx, [ebp - 4]
mov eax, ebx
call fcn.00406978
mov eax, dword [ebp - 4]
call fcn.00403414
push eax
call sub.kernel32.dll_GetFileAttributesA
mov ebx, eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x406a2b
lea eax, [ebp - 4]
call fcn.00403198
ret
Function at 0x100292f
Capabilities:
Persist via winlogon helper dll registry key

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [ebp + 0x18]
push ebx
xor ebx, ebx
neg eax
sbb eax, eax
push esi
and eax, 6
push edi
inc eax
mov esi, 0x208
movzx eax, ax
push esi
push 0x40
mov dword [ebp - 0xc], ebx
mov dword [ebp - 4], esi
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x1c], ebx
call dword [fcn.0100117c]
mov edi, eax
mov dword [ebp + 0x18], edi
cmp edi, ebx
je 0x1003546
mov ebx, dword [fcn.01001020]
cmp dword [ebp + 0xc], 0
je 0x100299b
push dword [ebp + 0xc]
push 0x104
push edi
call fcn.01002170
mov edi, eax
test edi, edi
jl 0x10035b8
mov edi, dword [ebp + 0x18]
lea eax, [ebp - 8]
push eax
xor eax, eax
cmp dword [ebp + 0x10], eax
push 0x20019
setne al
push 0
push 0x1002078
add eax, 0x80000001
push eax
call dword [fcn.01001024]
test eax, eax
jne 0x1002a0a
lea eax, [ebp - 4]
push eax
push edi
lea eax, [ebp - 0x10]
push eax
push 0
push dword [ebp + 8]
mov dword [ebp - 4], esi
push dword [ebp - 8]
call ebx
test eax, eax
jne 0x1002a01
cmp dword [ebp - 0x10], 1
jne 0x1002aec
mov eax, dword [ebp - 4]
cmp eax, 2
jb 0x1002aec
shr eax, 1
cmp word [edi + eax*2 - 2], 0
jne 0x1002aec
push dword [ebp - 8]
call dword [fcn.01001028]
xor eax, eax
cmp dword [ebp - 0x14], eax
jne 0x1002a38
cmp dword [ebp + 0x10], eax
jne 0x1002a38
lea ecx, [ebp - 8]
push ecx
push 0x20019
push eax
push 0x1001fa8
push 0x80000001
call dword [fcn.01001024]
test eax, eax
je 0x100356a
xor esi, esi
cmp word [edi], si
jne 0x1002a4f
push edi
call dword [fcn.01001180]
mov eax, esi
pop edi
pop esi
pop ebx
leave
ret 0x18
mov ebx, dword [ebp + 0x18]
xor esi, esi
cmp dword [ebp + 0x1c], esi
je 0x10035ef
push 0x1002430
push dword [ebp + 8]
mov dword [ebp + 0xc], esi
mov esi, dword [0x10010a0]
call esi
pop ecx
pop ecx
test eax, eax
jne 0x1002a99
push 0x1002100
push ebx
call esi
pop ecx
pop ecx
test eax, eax
je 0x1002a92
push 0x10020e4
push ebx
call esi
pop ecx
pop ecx
test eax, eax
jne 0x1002a99
mov dword [ebp + 0xc], 1
xor esi, esi
cmp word [ebx], si
je 0x1002ad9
mov eax, ebx
cmp word [edi], si
je 0x1002ab1
cmp word [edi], 0x2c
je 0x1002afb
inc edi
inc edi
jmp 0x1002aa2
cmp word [edi], 0x2c
je 0x1002afb
cmp word [eax], 0x20
je 0x1002b04
push dword [ebp - 0x18]
push esi
push dword [ebp + 0x14]
push esi
push eax
call fcn.01001195
test eax, eax
je 0x1002ad2
inc dword [ebp - 0xc]
mov eax, edi
cmp word [edi], si
jne 0x1002aa7
cmp dword [ebp + 0xc], esi
je 0x10035d8
mov esi, dword [ebp - 0xc]
mov edi, ebx
jmp 0x1002a3f
cmp dword [ebp + 0xc], 0
jne 0x100354d
jmp 0x1003560
xor ecx, ecx
mov word [edi], cx
inc edi
inc edi
jmp 0x1002ab7
inc eax
inc eax
jmp 0x1002ab7
Function at 0x415b6c
Capabilities:
Create process on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x70
push ebx
push esi
xor eax, eax
mov dword [ebp - 0x14], ecx
push edi
push 0x44
push eax
mov dword [ebp - 0x10], eax
mov esi, eax
mov dword [ebp - 8], eax
mov ebx, edx
lea eax, [ebp - 0x6c]
push eax
call sub.msvcrt.dll_memset
xor eax, eax
lea edi, [ebp - 0x24]
stosd dword es:[edi], eax
add esp, 0xc
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
xor edi, edi
mov dword [ebp - 0xc], edi
test ebx, ebx
jne 0x415bae
mov esi, 0x80070057
jmp 0x415c20
cmp dword [ebp + 8], esi
je 0x415c82
lea eax, [ebp - 8]
push eax
push 0xb
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x415c11
push edi
push dword [ebp - 8]
lea eax, [ebp - 0xc]
mov dword [ebp - 0x6c], 0x44
push eax
mov dword [ebp - 0x64], 0x406e48
call dword [sym.imp.USERENV.dll_CreateEnvironmentBlock]
test eax, eax
je 0x415c11
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x6c]
push eax
push edi
push dword [ebp - 0xc]
push 0x408
push edi
push edi
push edi
push ebx
push edi
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
test eax, eax
jne 0x415c27
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
call fcn.00417d89
mov esi, eax
mov ecx, esi
call fcn.0041802b
cmp dword [ebp - 0x20], edi
je 0x415c35
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x24], edi
je 0x415c43
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0xc], edi
je 0x415c51
push dword [ebp - 0xc]
call dword [sym.imp.USERENV.dll_DestroyEnvironmentBlock]
mov ecx, esi
call fcn.00418048
cmp dword [ebp - 8], edi
je 0x415c69
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 8], edi
cmp dword [ebp - 0x10], edi
je 0x415c77
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
lea eax, [ebp - 0x10]
push eax
push dword [ebp - 0x14]
call dword [sym.imp.WTSAPI32.dll_WTSQueryUserToken]
test eax, eax
je 0x415c11
lea eax, [ebp - 8]
push eax
push 1
push 2
push edi
push 0xb
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
jmp 0x415bca
Function at 0x415cb5
Capabilities:
Enumerate processes on remote desktop session host

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x22c
mov eax, dword [0x470008]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
xor edi, edi
mov esi, ecx
mov dword [ebp - 0x214], edi
mov ebx, edi
mov dword [ebp - 0x21c], edi
mov dword [ebp - 0x224], edi
mov dword [ebp - 0x218], edi
test esi, esi
jne 0x415cf9
mov esi, 0x80070057
jmp 0x415e88
push ecx
call fcn.00415958
test al, al
jne 0x415d0d
mov esi, 0x80004001
jmp 0x415e88
push esi
mov edx, 0x104
lea ecx, [ebp - 0x210]
call fcn.004142e1
mov esi, eax
test esi, esi
js 0x415e88
lea eax, [ebp - 0x228]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
call dword [sym.imp.KERNEL32.dll_ProcessIdToSessionId]
test eax, eax
jne 0x415d54
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
call fcn.00417d89
mov esi, eax
jmp 0x415e88
mov ecx, dword [ebp - 0x228]
test ecx, ecx
jne 0x415e75
lea eax, [ebp - 0x224]
xor edx, edx
push eax
inc edx
mov ecx, 0x406e68
call fcn.00415a1f
mov esi, eax
test esi, esi
js 0x415e88
xor edx, edx
lea eax, [ebp - 0x218]
inc edx
mov ecx, 0x406e9c
push eax
mov dword [ebp - 0x22c], edx
call fcn.00415a1f
mov esi, eax
test esi, esi
jns 0x415dac
mov ecx, esi
call fcn.0041802b
jmp 0x415e37
lea eax, [ebp - 0x21c]
xor ebx, ebx
push eax
lea eax, [ebp - 0x214]
inc ebx
push eax
push ebx
push edi
push edi
mov dword [ebp - 0x220], ebx
call dword [sym.imp.WTSAPI32.dll_WTSEnumerateSessionsW]
test eax, eax
jne 0x415de1
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
call fcn.00417d89
mov esi, eax
jmp 0x415da0
mov eax, dword [ebp - 0x21c]
mov ebx, edi
test eax, eax
je 0x415e31
mov edx, dword [ebp - 0x214]
mov ecx, dword [edi + edx]
test ecx, ecx
je 0x415e20
mov edx, dword [edi + edx + 8]
test edx, edx
je 0x415e07
cmp edx, 4
jne 0x415e20
push 0
lea edx, [ebp - 0x210]
call fcn.00415b6c
mov esi, eax
test esi, esi
js 0x415e2a
mov eax, dword [ebp - 0x21c]
inc ebx
add edi, 0xc
cmp ebx, eax
jb 0x415ded
jmp 0x415e31
mov ecx, esi
call fcn.0041802b
mov ebx, dword [ebp - 0x220]
cmp dword [ebp - 0x224], 0
jne 0x415e53
lea eax, [ebp - 0x22c]
xor edx, edx
push eax
mov ecx, 0x406e68
call fcn.00415a1f
test ebx, ebx
je 0x415e8f
cmp dword [ebp - 0x218], 0
jne 0x415e8f
lea eax, [ebp - 0x218]
xor edx, edx
push eax
mov ecx, 0x406e9c
call fcn.00415a1f
jmp 0x415e8f
push 1
lea edx, [ebp - 0x210]
call fcn.00415b6c
mov esi, eax
test esi, esi
jns 0x415e8f
mov ecx, esi
call fcn.0041802b
cmp dword [ebp - 0x214], 0
je 0x415ea4
push dword [ebp - 0x214]
call dword [sym.imp.WTSAPI32.dll_WTSFreeMemory]
mov ecx, esi
call fcn.00418048
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00450290
mov esp, ebp
pop ebp
ret
Function at 0x4187ad
Capabilities:
Check if file exists
Get file attributes

Disassembly:
mov edi, edi
push esi
push ecx
mov esi, edx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x4187c9
movzx eax, al
shr eax, 4
and eax, 1
jmp 0x4187cb
xor eax, eax
xor ecx, ecx
mov dword [esi], eax
call fcn.00418048
xor ecx, ecx
call fcn.00418048
xor eax, eax
pop esi
ret

Function at 0x4187e4
Capabilities:
Check if file exists
Get file attributes

Disassembly:
mov edi, edi
push esi
push ecx
mov esi, edx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x418802
not al
movzx eax, al
shr eax, 4
and eax, 1
jmp 0x418804
xor eax, eax
xor ecx, ecx
mov dword [esi], eax
call fcn.00418048
xor ecx, ecx
call fcn.00418048
xor eax, eax
pop esi
ret
Function at 0x41881d
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x64c
mov eax, dword [0x470008]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, ecx
push esi
push edi
test ebx, ebx
je 0x418850
lea eax, [ebp - 0x64c]
mov edx, 0x104
push eax
call fcn.00414456
mov esi, eax
jmp 0x418855
mov esi, 0x80070057
test esi, esi
jns 0x41885d
xor edi, edi
jmp 0x418863
mov edi, dword [ebp - 0x64c]
test esi, esi
js 0x418a70
push ebx
mov edx, 0x105
lea ecx, [ebp - 0x428]
call fcn.004142e1
mov esi, eax
test esi, esi
js 0x418a70
lea eax, [edi - 1]
mov ecx, 0x80070216
cmp eax, edi
ja 0x418898
mov edi, eax
xor esi, esi
jmp 0x41889f
mov esi, ecx
call fcn.0041802b
mov ecx, esi
call fcn.00418048
test esi, esi
js 0x418a70
add edi, edi
push 0x5c
pop ecx
cmp word [ebp + edi - 0x428], cx
jne 0x4188d3
cmp edi, 0x20a
jae 0x418a9a
xor eax, eax
mov word [ebp + edi - 0x428], ax
xor eax, eax
lea edi, [ebp - 0x428]
and dword [ebp - 0x640], eax
mov word [ebp - 0x218], ax
cmp word [ebp - 0x428], cx
jne 0x4188f7
lea edi, [ebp - 0x426]
push ecx
push edi
call dword [sym.imp.msvcrt.dll_wcschr]
pop ecx
mov ebx, eax
mov edx, 0x105
mov dword [ebp - 0x63c], ebx
pop ecx
lea ecx, [ebp - 0x638]
test ebx, ebx
jne 0x418934
push edi
call fcn.004142e1
mov esi, eax
test esi, esi
js 0x418a70
mov dword [ebp - 0x640], 1
jmp 0x418973
sub ebx, edi
sar ebx, 1
push ebx
push edi
call fcn.0041431f
mov esi, eax
test esi, esi
js 0x418a70
cmp dword [ebp - 0x63c], edi
jb 0x418a91
add ebx, ebx
cmp ebx, 0x20a
jae 0x418a9a
xor eax, eax
mov word [ebp + ebx - 0x638], ax
mov ebx, dword [ebp - 0x63c]
lea eax, [ebp - 0x644]
mov edx, 0x105
push eax
lea ecx, [ebp - 0x218]
call fcn.00414456
mov esi, eax
test esi, esi
js 0x418a70
push 0x7ffffffe
lea eax, [ebp - 0x638]
mov edx, 0x105
push eax
mov eax, dword [ebp - 0x644]
sub edx, eax
push ecx
lea ecx, [ebp - 0x218]
lea ecx, [ecx + eax*2]
call fcn.0041449d
mov esi, eax
test esi, esi
js 0x418a70
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x4189dc
test al, 0x10
jne 0x418a01
push 0
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
je 0x418a61
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x418a61
test ebx, ebx
je 0x418a50
lea edi, [ebx + 2]
mov ebx, 0x105
lea eax, [ebp - 0x648]
mov edx, ebx
push eax
lea ecx, [ebp - 0x218]
call fcn.00414456
mov esi, eax
test esi, esi
js 0x418a70
mov eax, dword [ebp - 0x648]
mov edx, ebx
push 0x7ffffffe
push 0x406438
push ecx
lea ecx, [ebp - 0x218]
sub edx, eax
lea ecx, [ecx + eax*2]
call fcn.0041449d
mov esi, eax
test esi, esi
js 0x418a70
cmp dword [ebp - 0x640], 0
jne 0x418a77
push 0x5c
pop ecx
jmp 0x4188f7
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
call fcn.00417d89
mov esi, eax
mov ecx, esi
call fcn.0041802b
mov ecx, esi
call fcn.00418048
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00450290
mov esp, ebp
pop ebp
ret
mov ecx, 0x80070216
mov esi, ecx
jmp 0x418a72
call fcn.00450675
int3
Function at 0x418e53
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x424
mov eax, dword [0x470008]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
xor esi, esi
mov dword [ebp - 0x424], ecx
push 0x410
lea eax, [ebp - 0x418]
mov dword [ebp - 0x41c], esi
push esi
mov edi, esi
push eax
mov dword [ebp - 0x420], edi
call sub.msvcrt.dll_memset
add esp, 0xc
lea eax, [ebp - 0x418]
push 0x208
push eax
push 0x407a68
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
jne 0x418ecc
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
call fcn.00417d89
mov ebx, eax
mov ecx, ebx
call fcn.0041802b
jmp 0x418f72
lea eax, [ebp - 0x41c]
mov edx, 0x407a7c
push eax
push ecx
lea ecx, [ebp - 0x418]
call fcn.00418aa5
mov ebx, eax
test ebx, ebx
jns 0x418ef9
mov ecx, ebx
call fcn.0041802b
mov esi, dword [ebp - 0x41c]
jmp 0x418f72
mov esi, dword [ebp - 0x41c]
lea edx, [ebp - 0x41c]
mov ecx, esi
call fcn.004187ad
mov ebx, eax
test ebx, ebx
js 0x418ec0
cmp dword [ebp - 0x41c], edi
jne 0x418f27
mov ecx, esi
call fcn.0041881d
mov ebx, eax
test ebx, ebx
js 0x418ec0
lea eax, [ebp - 0x420]
mov edx, 0x407a90
push eax
push ecx
mov ecx, esi
call fcn.00418aa5
mov ebx, eax
test ebx, ebx
jns 0x418f50
mov ecx, ebx
call fcn.0041802b
mov edi, dword [ebp - 0x420]
jmp 0x418f72
mov edi, dword [ebp - 0x420]
mov ecx, edi
call fcn.00447da4
test eax, eax
je 0x418eb1
mov eax, dword [ebp - 0x424]
mov dword [eax + 8], 1
mov ecx, ebx
call fcn.00418048
test edi, edi
je 0x418f84
mov ecx, edi
call fcn.00417eee
test esi, esi
je 0x418f8f
mov ecx, esi
call fcn.00417eee
mov ecx, dword [ebp - 4]
mov eax, ebx
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00450290
mov esp, ebp
pop ebp
ret