joyce8/EMBER2024-capa huggingface dataset:
Function at 0x402a70
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
pushal
call 0x402a7f
pop dword [ebp - 0x38]
mov eax, 0x59e0995e
sub eax, 0x59a06edf
sub dword [ebp - 0x38], eax
mov dword [ebp - 0x48], 0xaa3162cb
add dword [ebp - 0x48], 0xa420e280
mov dword [ebp - 0x44], 0xa67d5c4a
sub dword [ebp - 0x44], 0x744a1005
mov dword [ebp - 0x40], 0x86d99878
add dword [ebp - 0x40], 0xc572abb6
mov dword [ebp - 0x3c], 0x2266a422
sub dword [ebp - 0x3c], 0x2266a422
lea eax, [ebp - 0x48]
push eax
mov eax, 0x3fc29d90
sub eax, 0x3f815d00
add eax, dword [ebp - 0x38]
call dword [eax]
mov dword [ebp - 0x48], 0x32d58a3a
add dword [ebp - 0x48], 0x419cdf1c
mov dword [ebp - 0x44], 0xb29120ce
sub dword [ebp - 0x44], 0x7124bf59
mov dword [ebp - 0x40], 0x5ff1d5f2
add dword [ebp - 0x40], 0x37d967a
mov dword [ebp - 0x3c], 0x249a7ea7
add dword [ebp - 0x3c], 0xdb658159
lea ebx, [ebp - 0x48]
push ebx
push eax
mov eax, sym.imp.kernel32.dll_GetProcAddress
add eax, dword [ebp - 0x38]
call dword [eax]
push 0x40
push 0x1000
push 0x3dd0a
push 0
call eax
mov ecx, 0x544d
mov esi, eax
mov edi, 0x41c000
add edi, dword [ebp - 0x38]
mov edx, 0xec999cb
add edx, 0x8d1a0813
add dword [ebp - 0xc], 0x5e4dc56a
mov ebx, dword [edi]
mov dword [ebp - 0x10], 0x811bb054
add ebx, edx
xor dword [ebp - 0x1c], 0x9b7112cc
mov dword [esi], ebx
xor dword [ebp - 0x24], esi
add esi, 4
add edi, 0x46ba9431
add edi, 0xb9456bd3
loop 0x402b90
add eax, 0xad5f82ee
add eax, 0x52a1c119
mov ebx, eax
add eax, 0x5dc4f4fc
sub eax, 0x5dc4f4f7
mov ecx, 0x400000
add ecx, dword [ebp - 0x38]
call ebx
leave
ret
Function at 0x4045f2
Capabilities:
Contain obfuscated stackstrings

Disassembly:
inc dword [eax - 0x3a]
test dword [edx + 0x51fffffc], esi
mov byte [ebp - 0x34d], 0x75
mov byte [ebp - 0x34c], 0x57
mov byte [ebp - 0x34b], 0x4a
dec edx
mov byte [ebp - 0x34a], 0x46
mov byte [ebp - 0x349], 0x40
mov byte [ebp - 0x348], 0x56
mov byte [ebp - 0x347], 0x56
mov byte [ebp - 0x346], 0x6d
mov byte [ebp - 0x345], 0x40
mov byte [ebp - 0x344], 0x44
mov byte [ebp - 0x343], 0x55
mov byte [ebp - 0x342], 0x25
lea eax, [ebp - 0x354]
push eax
call fcn.00403dc7
pop ecx
push eax
push dword [ebp + 0x18]
jne 0x404678
push dword [ebp + 0x14]
call fcn.00403d7c
add esp, 0xc
mov dword [ebp - 0x68c], eax
call dword [ebp - 0x68c]
mov dword [ebp - 0x674], eax
mov dword [ebp - 0x384], 4
and byte [ebp - 0x334], 0
push 0x40
pop ecx
xor eax, eax
lea edi, [ebp - 0x333]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov dword [ebp - 0x670], 4
and byte [ebp - 0x3c4], 0
and byte [ebp - 0x3c3], 0
invalid

Function at 0x4049d3
Capabilities:
Contain obfuscated stackstrings

Disassembly:
inc dword [eax]
and byte [ebp - 0x513], 0
mov byte [ebp - 0x512], 0xe3
and byte [ebp - 0x511], 0
mov byte [ebp - 0x510], 0x5b
mov byte [ebp - 0x50f], 0x79
mov byte [ebp - 0x50e], 0x68
mov byte [ebp - 0x50d], 0x5a
test ebx, esi
cli
invalid
call [edx - 0x3a]
test esp, esi
cli
invalid
push dword [ebp - 0x3a]
test ebp, esi
cli
invalid
push dword [eax - 0x3a]
test esi, esi
cli
invalid
invalid
jns 0x4049e2
test edi, esi
cli
invalid
dec dword [edi - 0x3a]
test eax, edi
cli
invalid
push dword [ebp - 0x3a]
test ecx, edi
Function at 0x40110c
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x434030]
jne 0x401116
repz ret
jmp fcn.00401b11

Function at 0x408edc
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
call fcn.004047d5
and dword [ebp - 4], 0
cmp dword [0x43678c], 0
mov ebx, eax
jne 0x408f8d
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
test edi, edi
je 0x40903e
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxA
push edi
call esi
test eax, eax
je 0x40903e
push eax
call fcn.00404763
mov dword [esp], str.GetActiveWindow
push edi
mov dword [0x43678c], eax
call esi
push eax
call fcn.00404763
mov dword [esp], str.GetLastActivePopup
push edi
mov dword [0x436790], eax
call esi
push eax
call fcn.00404763
mov dword [esp], str.GetUserObjectInformationA
push edi
mov dword [0x436794], eax
call esi
push eax
call fcn.00404763
pop ecx
mov dword [0x43679c], eax
test eax, eax
je 0x408f8d
push str.GetProcessWindowStation
push edi
call esi
push eax
call fcn.00404763
pop ecx
mov dword [0x436798], eax
mov eax, dword [0x436798]
cmp eax, ebx
je 0x408fe5
cmp dword [0x43679c], ebx
je 0x408fe5
push eax
call fcn.004047de
push dword [0x43679c]
mov esi, eax
call fcn.004047de
pop ecx
pop ecx
mov edi, eax
test esi, esi
je 0x408fe5
test edi, edi
je 0x408fe5
call esi
test eax, eax
je 0x408fdc
lea ecx, [ebp - 8]
push ecx
push 0xc
lea ecx, [ebp - 0x14]
push ecx
push 1
push eax
call edi
test eax, eax
je 0x408fdc
test byte [ebp - 0xc], 1
jne 0x408fe5
or dword [ebp + 0x10], 0x200000
jmp 0x40901e
mov eax, dword [0x436790]
cmp eax, ebx
je 0x40901e
push eax
call fcn.004047de
pop ecx
test eax, eax
je 0x40901e
call eax
mov dword [ebp - 4], eax
test eax, eax
je 0x40901e
mov eax, dword [0x436794]
cmp eax, ebx
je 0x40901e
push eax
call fcn.004047de
pop ecx
test eax, eax
je 0x40901e
push dword [ebp - 4]
call eax
mov dword [ebp - 4], eax
push dword [0x43678c]
call fcn.004047de
pop ecx
test eax, eax
je 0x40903e
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call eax
jmp 0x409040
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret

Function at 0x40b120
Capabilities:
Set console window title

Disassembly:
sub esp, 0x428
mov eax, dword [0x434030]
xor eax, esp
mov dword [esp + 0x424], eax
mov eax, dword [0x2aef1cc]
push ebx
mov ebx, dword [0x2aeeeec]
push esi
mov esi, dword [0x434f60]
push edi
mov edi, eax
cmp eax, 0x930
jne 0x40b161
push str.wozekajevirifegavonetucusiva
call dword [sym.imp.KERNEL32.dll_SetConsoleTitleW]
mov eax, dword [0x2aef1cc]
mov dword [0x2aeeee8], esi
cmp eax, 0x114e
jne 0x40b189
call dword [sym.imp.KERNEL32.dll_SetFileApisToOEM]
lea eax, [esp + 0x14]
push eax
push str.gavipokucohuj
call dword [sym.imp.KERNEL32.dll_BuildCommDCBA]
mov eax, dword [0x2aef1cc]
cmp eax, 0x2f
jne 0x40b1ab
lea ecx, [esp + 0x10]
push ecx
lea edx, [esp + 0x10]
push edx
push 0
lea eax, [esp + 0x3c]
push eax
push 0
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_ReadEventLogA]
call fcn.0040b050
mov ecx, dword [esp + 0x430]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0040110c
add esp, 0x428
ret
Function at 0x402661
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x4026a0
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x4026a0
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x4026a0
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x4026a0
cmp dword [ecx + 0x74], 0xe
jbe 0x4026a0
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret
Function at 0x5f289c0e
Capabilities:
Enumerate pe sections

Disassembly:
mov ecx, dword [esp + 8]
push esi
push edi
xor edi, edi
movzx eax, word [ecx + 0x14]
movzx esi, word [ecx + 6]
test esi, esi
lea eax, [eax + ecx + 0x18]
jbe 0x5f289c49
mov ecx, dword [eax + 8]
test ecx, ecx
jne 0x5f289c30
mov ecx, dword [eax + 0x10]
mov edx, dword [eax + 0xc]
cmp dword [esp + 0xc], edx
jb 0x5f289c41
add edx, ecx
cmp dword [esp + 0xc], edx
jb 0x5f289c4b
inc edi
add eax, 0x28
cmp edi, esi
jb 0x5f289c26
xor eax, eax
pop edi
pop esi
ret

Function at 0x5f289e80
Capabilities:
Contain obfuscated stackstrings

Disassembly:
jne 0x5f289e8e
push eax
push esi
push dword [ebp + 8]
call fcn.5f289b93
add esp, 0x10
lea ecx, [ebp - 0xb0]
push ecx
call eax
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0xac]
xor edx, edx
div ecx
xor edx, edx
mov dword [ebp - 0x8c], eax
mov eax, dword [ebp - 8]
div ecx
test edx, edx
je 0x5f289ebc
adc byte [ebp - 0xaf73], cl
call dword [ecx - 1]
ror byte [ebx - 0x727407bb], 1
push esp
invalid
inc dword [ebp - 0x8c]
imul ecx, dword [ebp - 0x8c]
mov dword [ebp + 0xc], ecx
mov byte [ebp - 0x40], bl
mov byte [ebp - 0x3f], bl
mov byte [ebp - 0x3e], 0xec
mov byte [ebp - 0x3d], bl
mov byte [ebp - 0x3c], 0x45
mov byte [ebp - 0x3b], 0x7a
mov byte [ebp - 0x3a], 0x61
mov byte [ebp - 0x39], 0x67
mov byte [ebp - 0x38], 0x66
mov byte [ebp - 0x37], 0x72
mov byte [ebp - 0x36], 0x7f
mov byte [ebp - 0x35], 0x52
mov byte [ebp - 0x34], 0x7f
mov byte [ebp - 0x33], 0x7f
mov byte [ebp - 0x32], 0x7c
mov byte [ebp - 0x31], 0x70
mov byte [ebp - 0x30], 0x13
call fcn.5f289bce
pop ss
jno 0x5f289f32
ljmp 0xc5e8:0x50c0458d
retf 0x3ba

Function at 0x5f28a010
Capabilities:
Contain obfuscated stackstrings

Disassembly:
inc ebp
fld qword [edx - 0x3a]
inc ebp
fimul word [ecx - 0x3a]
inc ebp
fistp word [ecx - 0x3a]
inc ebp
loopne 0x5f28a069
mov byte [ebp - 0x1f], 0x59
mov byte [ebp - 0x1e], 0x52
mov byte [ebp - 0x1d], 0x6a
mov byte [ebp - 0x1c], 0x2b
call fcn.5f289bde
push eax
push esi
push dword [ebp + 8]
call fcn.5f289b93
add esp, 0x30
mov dword [ebp - 0xb8], eax
call fcn.5f289bce
wait
lcall 0xff7c, 0x9d882a31
invalid
mov byte [ebp - 0x80], 0x51
mov byte [ebp - 0x7f], 0x73
mov byte [ebp - 0x7e], 0x62
mov byte [ebp - 0x7d], 0x5b
mov byte [ebp - 0x7c], 0x79
mov byte [ebp - 0x7b], 0x72
mov byte [ebp - 0x7a], 0x63
mov byte [ebp - 0x79], 0x7a
mov byte [ebp - 0x78], 0x73
mov byte [ebp - 0x77], 0x5e
mov byte [ebp - 0x76], 0x77
mov byte [ebp - 0x75], 0x78
mov byte [ebp - 0x74], 0x72
mov byte [ebp - 0x73], 0x7a
mov byte [ebp - 0x72], 0x73
mov byte [ebp - 0x71], 0x57
mov byte [ebp - 0x70], 0x16
call fcn.5f289bce
push eax
jge 0x5f28a08c
jae 0x5f28a054
inc ebp
mov dword [esi - 0x3a], ebx
inc ebp
mov dh, byte [edi - 0x3a]
inc ebp
mov edi, dword [eax - 0x3a]
inc ebp
invalid
mov dl, 0x8d
test dword [edi + edi*8 - 1], edi
call dword [eax - 0x18]
sbb al, 0xfb
invalid
Function at 0x5f28be70
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0xc], 0
mov eax, dword [ebp - 0x1c]
cmp dword [eax + 0x1c], 0
je 0x5f28bea0
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ecx + 0x1c]
mov dword [ebp - 0x14], edx
push 0x5f28ee08
lea eax, [ebp - 0x14]
push eax
call sub.MSVCRT.dll__CxxThrowException
cmp dword [ebp - 0xc], 0
jne 0x5f28bf35
mov ecx, dword [ebp + 0xc]
call fcn.5f287bd0
mov dword [ebp - 4], eax
lea ecx, [ebp - 4]
push ecx
push 0
mov ecx, dword [ebp + 0xc]
call fcn.5f282d60
push eax
lea edx, [ebp - 8]
push edx
push 0
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ecx + 4]
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
je 0x5f28bef5
cmp dword [ebp - 0x20], 0xea
je 0x5f28bf0c
jmp 0x5f28bf1c
push 1
mov ecx, dword [ebp - 4]
push ecx
mov ecx, dword [ebp + 0xc]
call fcn.5f289660
mov dword [ebp - 0xc], 1
jmp 0x5f28bf30
push 0
mov edx, dword [ebp - 4]
push edx
mov ecx, dword [ebp + 0xc]
call fcn.5f289540
jmp 0x5f28bf30
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x18], eax
push 0x5f28ee08
lea ecx, [ebp - 0x18]
push ecx
call sub.MSVCRT.dll__CxxThrowException
jmp 0x5f28bea0
cmp dword [ebp + 0x10], 0
je 0x5f28bf43
mov edx, dword [ebp + 0x10]
mov eax, dword [ebp - 8]
mov dword [edx], eax
mov esp, ebp
pop ebp
ret 0xc
Function at 0x5f28bf50
Capabilities:
Query environment variable
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5f28ecf9
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x34
mov dword [ebp - 0x3c], ecx
lea ecx, [ebp - 0x24]
call fcn.5f2820a0
mov dword [ebp - 4], 0
mov dword [ebp - 0x10], 0
lea eax, [ebp - 0x10]
push eax
push 0
lea ecx, [ebp - 0x14]
push ecx
push 0
mov edx, dword [ebp + 8]
push edx
mov eax, dword [ebp - 0x3c]
mov ecx, dword [eax + 4]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0
je 0x5f28bfbe
mov edx, dword [ebp - 0x28]
mov dword [ebp - 0x2c], edx
push 0x5f28ee08
lea eax, [ebp - 0x2c]
push eax
call sub.MSVCRT.dll__CxxThrowException
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 0x40], ecx
mov edx, dword [ebp - 0x40]
sub edx, 1
mov dword [ebp - 0x40], edx
cmp dword [ebp - 0x40], 6
ja case.0x5f28bfda.3
mov eax, dword [ebp - 0x40]
jmp dword [eax*4 + 0x5f28c0ff]
push 0
mov ecx, dword [ebp - 0x10]
push ecx
lea ecx, [ebp - 0x24]
call fcn.5f289540
lea edx, [ebp - 0x14]
push edx
lea eax, [ebp - 0x24]
push eax
mov ecx, dword [ebp + 8]
push ecx
mov ecx, dword [ebp - 0x3c]
call fcn.5f28be70
push 0
push 0
push 0
lea ecx, [ebp - 0x24]
call fcn.5f282d60
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x5f28c038
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x30], eax
push 0x5f28ee08
lea edx, [ebp - 0x30]
push edx
call sub.MSVCRT.dll__CxxThrowException
mov eax, dword [ebp - 0x10]
push eax
push 0
mov ecx, dword [ebp - 0x10]
push ecx
mov ecx, dword [ebp - 0x3c]
add ecx, 0xc
call fcn.5f289660
push eax
push 0
lea ecx, [ebp - 0x24]
call fcn.5f282d60
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x5f28c07f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x34], eax
push 0x5f28ee08
lea edx, [ebp - 0x34]
push edx
call sub.MSVCRT.dll__CxxThrowException
jmp 0x5f28c0c0
push 0
mov eax, dword [ebp - 0x10]
push eax
mov ecx, dword [ebp - 0x3c]
add ecx, 0xc
call fcn.5f289540
lea ecx, [ebp - 0x14]
push ecx
mov edx, dword [ebp - 0x3c]
add edx, 0xc
push edx
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 0x3c]
call fcn.5f28be70
jmp 0x5f28c0c0
mov dword [ebp - 0x38], 0xb
push 0x5f28ee08
lea ecx, [ebp - 0x38]
push ecx
call sub.MSVCRT.dll__CxxThrowException
push 0
mov ecx, dword [ebp - 0x3c]
add ecx, 0xc
call fcn.5f282d60
mov edx, dword [ebp + 0xc]
mov dword [edx], eax
cmp dword [ebp + 0x10], 0
je 0x5f28c0e0
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp - 0x14]
mov dword [eax], ecx
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x24]
call fcn.5f2820c0
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 0xc
Function at 0x5f28d310
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
mov dword [ebp - 0x14], ecx
push 0
lea eax, [ebp - 4]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
push edx
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x5f28d37c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0xe8
je 0x5f28d361
push 0
push 0
mov edx, dword [ebp - 8]
push edx
push 0
push 2
call fcn.5f285ef0
jmp 0x5f28d368
mov dword [ebp - 8], 0x6d
mov eax, dword [ebp - 8]
mov dword [ebp - 0x10], eax
push 0x5f28ee08
lea ecx, [ebp - 0x10]
push ecx
call sub.MSVCRT.dll__CxxThrowException
mov esp, ebp
pop ebp
ret 8

Function at 0x5f28d390
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x10], 0
cmp dword [ebp + 0xc], 0
jbe 0x5f28d415
push 0
lea eax, [ebp - 4]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
add edx, dword [ebp - 0x10]
push edx
mov eax, dword [ebp - 0x18]
mov ecx, dword [eax + 4]
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x5f28d401
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0x6d
je 0x5f28d3ed
push 0
push 0
mov edx, dword [ebp - 8]
push edx
push 0
push 2
call fcn.5f285ef0
mov eax, dword [ebp - 8]
mov dword [ebp - 0x14], eax
push 0x5f28ee08
lea ecx, [ebp - 0x14]
push ecx
call sub.MSVCRT.dll__CxxThrowException
mov edx, dword [ebp + 0xc]
sub edx, dword [ebp - 4]
mov dword [ebp + 0xc], edx
mov eax, dword [ebp - 0x10]
add eax, dword [ebp - 4]
mov dword [ebp - 0x10], eax
jmp 0x5f28d3a0
mov esp, ebp
pop ebp
ret 8
Function at 0x402d84
Capabilities:
Get common file path
Set current directory

Disassembly:
push ebx
push esi
add esp, 0xfffffdf0
mov esi, edx
mov ebx, eax
test bl, bl
je 0x402dc0
movzx eax, bl
add eax, 0x41
dec eax
mov byte [esp], al
mov byte [esp + 1], 0x3a
mov byte [esp + 2], 0
lea eax, [esp + 0x109]
push eax
push 0x105
call sub.kernel32.dll_GetCurrentDirectoryA
push esp
call sub.kernel32.dll_SetCurrentDirectoryA
lea eax, [esp + 4]
push eax
push 0x105
call sub.kernel32.dll_GetCurrentDirectoryA
test bl, bl
je 0x402de0
lea eax, [esp + 0x109]
push eax
call sub.kernel32.dll_SetCurrentDirectoryA
mov eax, esi
lea edx, [esp + 4]
mov ecx, 0x105
call fcn.00404354
add esp, 0x210
pop esi
pop ebx
ret

Function at 0x403058
Capabilities:
Accept command line arguments

Disassembly:
push ebx
push esi
push edi
add esp, 0xfffffef8
mov ebx, edx
mov esi, eax
mov eax, ebx
call fcn.004041f4
test esi, esi
jne 0x40308e
push 0x105
lea eax, [esp + 4]
push eax
push 0
call sub.kernel32.dll_GetModuleFileNameA
mov ecx, eax
mov edx, esp
mov eax, ebx
call fcn.004042e4
jmp 0x4030ac
call sub.kernel32.dll_GetCommandLineA
mov edi, eax
mov edx, ebx
mov eax, edi
call fcn.00402efc
mov edi, eax
test esi, esi
je 0x4030ac
cmp dword [ebx], 0
je 0x4030ac
dec esi
jmp 0x403095
add esp, 0x108
pop edi
pop esi
pop ebx
ret

Function at 0x4036b8
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff4
movzx eax, word [0x40b010]
mov dword [ebp - 8], eax
lea eax, [ebp - 4]
push eax
push 1
push 0
push 0x403750
push 0x80000002
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
jne 0x403730
xor eax, eax
push ebp
push 0x403729
push dword fs:[eax]
mov dword fs:[eax], esp
mov dword [ebp - 0xc], 4
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 8]
push eax
push 0
push 0
push 0x40376c
mov eax, dword [ebp - 4]
push eax
call sub.advapi32.dll_RegQueryValueExA
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x403730
mov eax, dword [ebp - 4]
push eax
call sub.advapi32.dll_RegCloseKey
ret
movzx eax, word [0x40b010]
and ax, 0xffc0
movzx edx, word [ebp - 8]
and dx, 0x3f
or ax, dx
mov word [0x40b010], ax
mov esp, ebp
pop ebp
ret

Function at 0x404074
Capabilities:
Write file on windows

Disassembly:
push ecx
cmp byte [0x40c034], 0
je 0x4040d5
cmp word [0x40c208], 0xd7b2
jne 0x40409d
cmp dword [0x40c210], 0
jbe 0x40409d
mov eax, 0x40c204
call dword [0x40c220]
push 0
lea eax, [esp + 4]
push eax
push 0x1e
push str.Runtime_error_____at_00000000
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
push 0
lea eax, [esp + 4]
push eax
push 2
push 0x4040fc
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
pop edx
ret
cmp byte [0x40b01c], 0
jne 0x4040f1
push 0
push str.Error
push str.Runtime_error_____at_00000000
push 0
call sub.user32.dll_MessageBoxA
pop edx
ret

Function at 0x405054
Capabilities:
Get file attributes

Disassembly:
push ebx
mov ebx, eax
mov eax, ebx
call fcn.0040453c
push eax
call sub.kernel32.dll_GetFileAttributesA
pop ebx
ret
Function at 0x405068
Capabilities:
Set file attributes

Disassembly:
push ebx
push esi
push edi
mov edi, edx
mov esi, eax
xor ebx, ebx
push edi
mov eax, esi
call fcn.0040453c
push eax
call sub.kernel32.dll_SetFileAttributesA
test eax, eax
jne 0x40508a
call sub.kernel32.dll_GetLastError_1
mov ebx, eax
mov eax, ebx
pop edi
pop esi
pop ebx
ret

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

Disassembly:
push ebx
mov ebx, eax
mov eax, ebx
call fcn.0040453c
push eax
call sub.kernel32.dll_GetFileAttributesA
cmp eax, 0xffffffff
je 0x4050a9
test al, 0x10
jne 0x4050ad
xor eax, eax
pop ebx
ret
mov al, 1
pop ebx
ret

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

Disassembly:
push ebx
mov ebx, eax
mov eax, ebx
call fcn.0040453c
push eax
call sub.kernel32.dll_GetFileAttributesA
cmp eax, 0xffffffff
je 0x4050cd
test al, 0x10
je 0x4050d1
xor eax, eax
pop ebx
ret
mov al, 1
pop ebx
ret

Function at 0x405624
Capabilities:
Get token membership

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffec
push ebx
push esi
push edi
mov byte [ebp - 1], 0
xor eax, eax
push ebp
push 0x4056cc
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [0x40b798]
mov dword [ebp - 0xe], eax
mov ax, word [0x40b79c]
mov word [ebp - 0xa], ax
lea eax, [ebp - 0x14]
push eax
push 0
push 0
push 0
push 0
push 0
push 0
push 0x220
push 0x20
push 2
lea eax, [ebp - 0xe]
push eax
call sub.advapi32.dll_AllocateAndInitializeSid
test eax, eax
je 0x4056c2
xor eax, eax
push ebp
push 0x4056bb
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebp - 8]
push eax
mov eax, dword [ebp - 0x14]
push eax
push 0
call sub.advapi32.dll_CheckTokenMembership
test eax, eax
je 0x4056a4
cmp dword [ebp - 8], 1
sbb eax, eax
inc eax
mov byte [ebp - 1], al
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4056c2
mov eax, dword [ebp - 0x14]
push eax
call sub.advapi32.dll_FreeSid
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x4056da
movzx eax, byte [ebp - 1]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x4056e8
Capabilities:
Check os version

Disassembly:
push ebx
add esp, 0xffffff6c
xor ebx, ebx
mov dword [esp], 0x94
push esp
call sub.kernel32.dll_GetVersionExA
test eax, eax
je 0x405716
cmp dword [esp + 0x10], 2
jne 0x405710
cmp dword [esp + 4], 6
jae 0x405714
xor ebx, ebx
jmp 0x405716
mov bl, 1
mov eax, ebx
add esp, 0x94
pop ebx
ret

Function at 0x405720
Capabilities:
Get geographical location

Disassembly:
push ebx
add esp, 0xfffffefc
mov ebx, eax
push pe_nt_image_headers32
lea eax, [esp + 4]
push eax
push 3
push 0x800
call sub.kernel32.dll_GetLocaleInfoA
test eax, eax
jle 0x40577e
mov eax, ebx
mov edx, esp
mov ecx, pe_nt_image_headers32
call fcn.00404354
mov eax, dword [ebx]
mov dword [esp + 0x100], eax
mov eax, dword [esp + 0x100]
test eax, eax
je 0x40576a
sub eax, 4
mov eax, dword [eax]
cmp eax, 3
je 0x40578b
mov eax, ebx
mov edx, dword [0x40e7f0]
call fcn.00404248
jmp 0x40578b
mov eax, ebx
mov edx, dword [0x40e7f0]
call fcn.00404248
add esp, 0x104
pop ebx
ret