joyce8/EMBER2024-capa huggingface dataset:
Function at 0x406e12
Capabilities:
Create http request
Read data from internet
Receive data

Disassembly:
push 0x424
mov eax, 0x438680
call fcn.00422ef7
mov dword [ebp - 0x41c], ecx
xor ebx, ebx
mov dword [ebp - 4], ebx
lea ecx, [ebp - 0x428]
mov dword [ebp - 0x428], 4
mov dword [ebp - 0x424], 0xece8e8d4
mov dword [ebp - 0x420], 0xef8d7c
call fcn.0040495b
push eax
lea ecx, [ebp - 0x42c]
call fcn.00402546
mov byte [ebp - 4], 1
push ebx
push ebx
push ebx
push ebx
push dword [eax]
call dword [sym.imp.WININET.dll_InternetOpenW]
mov esi, eax
mov dword [ebp - 0x430], esi
mov byte [ebp - 4], bl
mov ecx, dword [ebp - 0x42c]
add ecx, 0xfffffff0
call fcn.00401564
test esi, esi
je 0x406f40
push ebx
push SysReAllocString
push ebx
push ebx
push dword [ebp + 8]
push esi
call dword [sym.imp.WININET.dll_InternetOpenUrlW]
mov edi, dword [sym.imp.WININET.dll_InternetCloseHandle]
mov esi, eax
test esi, esi
je 0x406f38
mov edi, dword [ebp - 0x41c]
mov dword [ebp - 0x418], ebx
push 0x401
lea eax, [ebp - 0x414]
push ebx
push eax
call fcn.004247d0
add esp, 0xc
lea eax, [ebp - 0x418]
push eax
push 0x400
lea eax, [ebp - 0x414]
push eax
push esi
call dword [sym.imp.WININET.dll_InternetReadFile]
push ecx
lea edx, [ebp - 0x414]
lea ecx, [ebp - 0x41c]
call fcn.00401e7b
pop ecx
mov byte [ebp - 4], 3
mov ecx, edi
mov eax, dword [eax]
push dword [eax - 0xc]
push eax
call fcn.00402d6d
mov byte [ebp - 4], bl
mov ecx, dword [ebp - 0x41c]
add ecx, 0xfffffff0
call fcn.00401564
cmp dword [ebp - 0x418], 0
jne 0x406ec0
mov edi, dword [sym.imp.WININET.dll_InternetCloseHandle]
mov bl, 1
push esi
call edi
push dword [ebp - 0x430]
call edi
or dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp + 8]
add ecx, 0xfffffff0
call fcn.00401564
mov al, bl
call fcn.00422ea6
ret
Function at 0x40749a
Capabilities:
Create thread

Disassembly:
push 0x10
mov eax, 0x438864
call fcn.00422ec4
mov ebx, edx
mov edi, ecx
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x18], eax
mov al, byte [ebp + 0x14]
mov byte [ebp - 0x14], al
and dword [ebp - 4], 0
push 0x40
call fcn.0040c25c
mov esi, eax
pop ecx
mov dword [ebp - 0x1c], esi
mov byte [ebp - 4], 1
test esi, esi
je 0x407502
push dword [ebp - 0x14]
lea eax, [ebp + 8]
push dword [ebp - 0x18]
push dword [ebp - 0x10]
push ebx
push edi
push ecx
mov ecx, esp
mov dword [ebp - 0x10], esp
push eax
call fcn.004025e0
mov byte [ebp - 4], 2
mov byte [ebp - 4], 1
mov ecx, esi
call fcn.0040661e
xor ecx, ecx
jmp 0x407506
xor ecx, ecx
mov eax, ecx
mov byte [ebp - 4], cl
push ecx
push ecx
push eax
push 0x407783
push ecx
push ecx
call dword [sym.imp.KERNEL32.dll_CreateThread]
push 0x4451c4
push 0x4451cc
lea ecx, [ebp + 8]
call fcn.004049d4
push dword [ebp + 8]
call fcn.00401cb5
pop ecx
or dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp + 8]
lea ecx, [ecx - 0x10]
call fcn.00401564
call fcn.00422e92
ret

Function at 0x40778c
Capabilities:
Get process heap force flags

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x438976
mov eax, dword fs:[0]
push eax
sub esp, 0x18
push esi
push edi
mov eax, dword [0x44e524]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x10], esi
mov dword [ebp - 4], 4
lea ecx, [esi + 0x30]
mov dword [ebp - 0x14], ecx
mov byte [ebp - 4], 4
mov ecx, dword [ecx]
push 0x10
pop edi
sub ecx, edi
call fcn.00401564
mov byte [ebp - 4], 3
lea ecx, [esi + 0x2c]
mov dword [ebp - 0x18], ecx
mov byte [ebp - 4], 3
mov ecx, dword [ecx]
sub ecx, edi
call fcn.00401564
mov byte [ebp - 4], 2
lea ecx, [esi + 0x28]
mov dword [ebp - 0x1c], ecx
mov byte [ebp - 4], 2
mov ecx, dword [ecx]
sub ecx, edi
call fcn.00401564
mov byte [ebp - 4], 1
lea ecx, [esi + 0x24]
mov dword [ebp - 0x20], ecx
mov byte [ebp - 4], 1
mov ecx, dword [ecx]
sub ecx, edi
call fcn.00401564
mov byte [ebp - 4], 0
lea ecx, [esi + 0x20]
mov dword [ebp - 0x24], ecx
mov byte [ebp - 4], 0
mov ecx, dword [ecx]
sub ecx, edi
call fcn.00401564
or dword [ebp - 4], 0xffffffff
lea ecx, [esi + 0x10]
call fcn.00402640
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
leave
ret
Function at 0x408f3e
Capabilities:
Encode data using xor

Disassembly:
mov eax, dword [ecx]
push esi
xor esi, esi
test eax, eax
je 0x408f5c
mov al, byte [ecx + esi + 4]
sub al, byte [ecx + 0x34]
xor al, byte [ecx + 0x33]
mov byte [ecx + esi + 4], al
inc esi
mov eax, dword [ecx]
cmp esi, eax
jb 0x408f47
mov byte [eax + ecx + 4], 0
lea eax, [ecx + 4]
pop esi
ret

Function at 0x408f66
Capabilities:
Encode data using xor

Disassembly:
mov eax, dword [ecx]
push esi
xor esi, esi
test eax, eax
je 0x408f84
mov al, byte [ecx + esi + 4]
sub al, byte [ecx + 0x2d]
xor al, byte [ecx + 0x2c]
mov byte [ecx + esi + 4], al
inc esi
mov eax, dword [ecx]
cmp esi, eax
jb 0x408f6f
mov byte [eax + ecx + 4], 0
lea eax, [ecx + 4]
pop esi
ret

Function at 0x408f8e
Capabilities:
Encode data using xor

Disassembly:
mov eax, dword [ecx]
push esi
xor esi, esi
test eax, eax
je 0x408fac
mov al, byte [ecx + esi + 4]
sub al, byte [ecx + 0xc]
xor al, byte [ecx + 0xb]
mov byte [ecx + esi + 4], al
inc esi
mov eax, dword [ecx]
cmp esi, eax
jb 0x408f97
mov byte [eax + ecx + 4], 0
lea eax, [ecx + 4]
pop esi
ret

Function at 0x408fb6
Capabilities:
Encode data using xor

Disassembly:
mov eax, dword [ecx]
push esi
xor esi, esi
test eax, eax
je 0x408fd4
mov al, byte [ecx + esi + 4]
sub al, byte [ecx + 0x2f]
xor al, byte [ecx + 0x2e]
mov byte [ecx + esi + 4], al
inc esi
mov eax, dword [ecx]
cmp esi, eax
jb 0x408fbf
mov byte [eax + ecx + 4], 0
lea eax, [ecx + 4]
pop esi
ret

Function at 0x409065
Capabilities:
Encode data using xor

Disassembly:
mov eax, dword [ecx]
push esi
xor esi, esi
test eax, eax
je 0x409083
mov al, byte [ecx + esi + 4]
sub al, byte [ecx + 9]
xor al, byte [ecx + 8]
mov byte [ecx + esi + 4], al
inc esi
mov eax, dword [ecx]
cmp esi, eax
jb 0x40906e
mov byte [eax + ecx + 4], 0
lea eax, [ecx + 4]
pop esi
ret

Function at 0x40980d
Capabilities:
Enumerate gui resources

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x60
push ebx
mov ebx, ecx
push ebx
push 0x4099de
mov eax, dword [ebx]
mov dword [ebx + 4], eax
call dword [sym.imp.USER32.dll_EnumWindows]
mov eax, dword [ebx + 4]
sub eax, dword [ebx]
push 0x4c
pop ecx
cdq
idiv ecx
mov ecx, eax
mov dword [ebp - 0x14], ecx
test ecx, ecx
je 0x4098b3
lea eax, [ecx - 1]
xor edx, edx
test eax, eax
je 0x4098b3
push esi
push edi
mov esi, ecx
sub esi, edx
sub esi, 1
mov dword [ebp - 8], esi
je 0x4098a9
xor ecx, ecx
mov dword [ebp - 4], ecx
mov edi, dword [ebx]
add edi, ecx
mov dword [ebp - 0x10], edi
lea eax, [edi + 0x4c]
mov dword [ebp - 0xc], eax
mov eax, dword [edi]
cmp eax, dword [edi + 0x4c]
jbe 0x409898
mov esi, edi
lea edi, [ebp - 0x60]
push 0x13
pop ecx
rep movsd dword es:[edi], dword [esi]
mov esi, dword [ebp - 0xc]
mov edi, dword [ebp - 0x10]
push 0x13
pop ecx
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [ebp - 4]
lea esi, [ebp - 0x60]
mov edi, dword [ebx]
add ecx, 0x4c
add edi, ecx
push 0x13
pop ecx
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [ebp - 4]
mov esi, dword [ebp - 8]
add ecx, 0x4c
sub esi, 1
mov dword [ebp - 4], ecx
mov dword [ebp - 8], esi
jne 0x409857
mov ecx, dword [ebp - 0x14]
inc edx
lea eax, [ecx - 1]
cmp edx, eax
jb 0x409846
pop edi
pop esi
mov eax, ecx
pop ebx
leave
ret
Function at 0x40a3b7
Capabilities:
Encode data using xor

Disassembly:
mov eax, dword [ecx]
push esi
xor esi, esi
test eax, eax
je 0x40a3d5
mov al, byte [ecx + esi + 4]
sub al, byte [ecx + 0x15]
xor al, byte [ecx + 0x14]
mov byte [ecx + esi + 4], al
inc esi
mov eax, dword [ecx]
cmp esi, eax
jb 0x40a3c0
mov byte [eax + ecx + 4], 0
lea eax, [ecx + 4]
pop esi
ret

Function at 0x40e9a9
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
xor esi, esi
mov ebx, ecx
push edi
cmp dword [ebp + 8], esi
je 0x40e9e8
call fcn.0041831d
push 0xf0
push dword [ebp + 8]
mov edi, dword [eax + 0xc]
push edi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
test eax, eax
je 0x40e9e8
push eax
push edi
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x40e9f0
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
push esi
mov ecx, ebx
call fcn.0040bd0b
pop edi
pop esi
pop ebx
pop ebp
ret 4

Function at 0x40f116
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
push esi
mov esi, ecx
push edi
test esi, esi
je 0x40f1a2
cmp dword [esi + 0x20], 0
je 0x40f1a2
push dword [esi + 0x20]
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x40f1a2
cmp dword [ebp + 8], 0
je 0x40f1a2
xor edi, edi
mov ebx, edi
call fcn.0041831d
push 0x43e5e0
push dword [ebp + 8]
mov eax, dword [eax + 0xc]
push eax
mov dword [ebp - 4], eax
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov dword [ebp - 8], eax
test eax, eax
je 0x40f186
mov ebx, dword [ebp - 4]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
push dword [ebp - 8]
mov edi, eax
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x40f1a2
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov ebx, eax
push edi
push ebx
push esi
call fcn.0041b144
mov edi, eax
add esp, 0xc
test edi, edi
je 0x40f19e
mov ecx, esi
call fcn.0040eef0
mov eax, edi
jmp 0x40f1a4
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 4

Function at 0x41349d
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
mov edi, ecx
mov dword [edi + 0x84], ebx
test ebx, 0xffff0000
jne 0x4134c8
cmp dword [edi + 0x80], 0
jne 0x4134c8
movzx eax, bx
mov dword [edi + 0x80], eax
call fcn.0041831d
push 5
push ebx
mov esi, dword [eax + 0xc]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
push esi
push dword [ebp + 0xc]
mov ecx, edi
push eax
call fcn.004136f5
pop edi
pop esi
pop ebx
pop ebp
ret 8
Function at 0x416309
Capabilities:
Query or enumerate registry value
Read .ini file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push esi
xor esi, esi
push edi
cmp dword [ecx + 0x58], esi
je 0x41635c
push esi
push dword [ebp + 8]
call fcn.004164f2
mov edi, eax
test edi, edi
je 0x416357
lea eax, [ebp - 4]
mov dword [ebp - 4], 4
push eax
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0xc]
push eax
push esi
push dword [ebp + 0xc]
push edi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push edi
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
jne 0x416357
mov eax, dword [ebp - 8]
jmp 0x41636e
mov eax, dword [ebp + 0x10]
jmp 0x41636e
push dword [ecx + 0x6c]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
pop edi
pop esi
leave
ret 0xc

Function at 0x43031e
Capabilities:
Set environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.0042ff9b

Function at 0x4018ed
Capabilities:
Encode data using base64 via winapi
Get common file path
Initialize winsock library

Disassembly:
push ebx
push ecx
push edx
enter 0x4d4, 0
lea eax, [ebp - 0x2cc]
push eax
push 2
call dword [sym.imp.WS2_32.DLL_WSAStartup]
push 0x104
lea eax, [ebp - 0x4d4]
push eax
call dword [sym.imp.KERNEL32.DLL_GetSystemDirectoryW]
xor eax, eax
push eax
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], eax
call dword [sym.imp.KERNEL32.DLL_GetModuleHandleA]
push 0x7f00
mov dword [ebp - 0x28], eax
xor eax, eax
mov dword [ebp - 0x1c], 6
push eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x18], eax
call dword [sym.imp.USER32.DLL_LoadIconA]
push 0x7f00
push 0
mov dword [ebp - 0x24], eax
call dword [sym.imp.USER32.DLL_LoadCursorA]
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0x38]
push eax
call dword [sym.imp.USER32.DLL_RegisterClassA]
push 0
push 0
call dword [sym.imp.KERNEL32.DLL_GetModuleHandleA]
push eax
call dword [sym.imp.USER32.DLL_LoadAcceleratorsA]
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x10]
push eax
push 1
push 1
lea eax, [ebp - 0x13c]
push eax
mov dword [ebp - 4], 0xa
mov byte [ebp - 0x13c], 0
call dword [sym.imp.CRYPT32.DLL_CryptBinaryToStringA]
movzx eax, byte [ebp - 0x10]
lea ebx, [eax - 0x47]
call dword [sym.imp.WS2_32.DLL_WSACleanup]
mov eax, dword [ebp - 4]
add eax, ebx
leave
pop edx
pop ecx
pop ebx
ret

Function at 0x401c44
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebx
push ecx
push edx
push esi
push edi
enter 4, 0
mov esi, eax
mov edx, dword [0x403050]
or dl, 1
imul edx, eax
mov edi, dword [0x403050]
mov ebx, eax
sub edi, edx
mov eax, 0x403054
mov edx, edi
call fcn.00401b81
lea edx, [ebp - 4]
push edx
mov edx, esi
or dl, 0x40
mov edi, 0x402d2c
push edx
sub edi, fcn.004024f7
push edi
xor eax, eax
push fcn.004024f7
mov dword [ebp - 4], eax
call dword [sym.imp.KERNEL32.DLL_VirtualProtect]
cmp dword [ebp - 4], 0
je 0x401cbc
mov eax, fcn.004024f7
mov ebx, esi
mov edx, edi
call fcn.00401b81
mov edx, 0x1be00
mov eax, 0x403054
mov ebx, esi
call fcn.00401343
leave
pop edi
pop esi
pop edx
pop ecx
pop ebx
ret
Function at 0x401080
Capabilities:
Encode data using add xor sub operations
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
mov eax, dword [ebp + 0xc]
mov eax, dword [ebp + 8]
mov esi, ebx
mov eax, ebx
mov esi, eax
mov eax, esi
mov esi, esi
xor ebx, esi
xor ebx, ebx
xor eax, eax
xor eax, ebx
imul ebx
inc edi
neg edx
dec esi
not edx
rcr eax, 0x54
rcr edi, 0xfa
bswap edi
not eax
or edx, 0x61
bswap esi
inc edx
inc eax
add eax, 0x67
not esi
inc edi
imul edi
dec eax
not eax
imul esi
and edx, 0x2f
dec ebx
neg esi
bswap edx
mov edx, 0x6a
mov edi, 0xd8
sbb esi, 2
and ebx, 0xbb
add eax, 0x4a
sub ebx, 0x70
not edi
not edx
sbb ebx, 0x23
not ebx
neg ebx
inc eax
rol edx, 0x12
or edx, 0x60
add edi, 0x1f
or ebx, 0x2a
inc ebx
mov esi, 0x72
and ebx, 0x4b
dec edx
not edi
imul eax
rol eax, 0xf7
imul eax
mov esi, 0x37
imul eax
xor ecx, ecx
xor edi, edi
xor ebx, eax
xor esi, eax
mov esi, esi
mov ebx, eax
xor esi, eax
xor ebx, esi
not ebx
rol eax, 8
add edi, 0xa2
dec ebx
not ebx
inc eax
not esi
inc eax
neg ebx
dec eax
mov esi, 0x68
mov eax, 0xf0
sbb edi, 0x49
bswap ebx
add edx, 0x82
bswap edx
sub edi, 0xb7
dec ebx
and ebx, 0xe5
rol esi, 0x54
neg eax
neg eax
imul eax
bswap eax
not ebx
imul edi
imul ebx
rcl esi, 0x40
and esi, 0xe1
imul edi
and eax, 0xe0
sbb edx, 0x7c
or esi, 0xe5
imul ebx
imul edi
neg edi
dec edx
neg eax
sbb edx, 0x9a
sbb edx, 0x85
add edx, 0x4d
inc esi
not ebx
not eax
rol edx, 0xde
inc ebx
bswap esi
imul edi
inc ebx
not esi
mov esi, ebx
xor esi, ebx
xor ebx, eax
xor eax, eax
xor ebx, ebx
mov esi, ebx
xor eax, eax
xor esi, eax
xor ebx, ebx
mov ecx, dword [ebp + 0xc]
bswap eax
sub edx, 0x2f
inc esi
or eax, 0
inc esi
add ebx, 0x9e
rol edi, 0xe2
sub edx, 0xfa
rcl esi, 0x10
sub eax, 0x3c
imul edx
rcr ebx, 0xf8
bswap esi
imul ebx
and edx, 0xf9
not esi
inc eax
neg edx
rol edx, 0x96
or edi, 0x93
or esi, 0xc0
neg esi
rol edx, 0xcb
inc edx
inc edi
rcr edi, 0x62
rcl edx, 0xe4
ror esi, 0xef
bswap ebx
or eax, 0x92
inc eax
rcr edi, 0x25
and edi, 0x38
sub ebx, 1
sbb edi, 0x85
mov eax, 0x2d
ror esi, 0xe
neg edi
dec ebx
not eax
sub eax, 0x27
bswap edx
neg esi
not esi
not eax
imul edx
sbb ebx, 0xb
ror edi, 0xf5
sub edx, 0x8d
neg eax
mov edi, dword [ebp + 8]
mov esi, esi
xor eax, ebx
mov esi, eax
mov eax, eax
xor ebx, eax
mov esi, eax
mov ebx, ebx
mov esi, eax
mov eax, esi
not byte [edi]
mov eax, esi
xor esi, eax
xor ebx, eax
mov ebx, ebx
xor esi, ebx
xor ebx, esi
xor esi, eax
xor esi, esi
xor eax, eax
xor ebx, ebx
xor eax, esi
xor eax, esi
sub byte [edi], 0xf1
add byte [edi], 0x63
mov esi, ebx
mov eax, ebx
xor esi, ebx
mov eax, esi
mov ebx, esi
xor ebx, esi
xor eax, esi
xor ebx, ebx
xor ebx, ebx
imul byte [edi]
inc edi
loop 0x401261
pop esi
pop edi
pop ebx
pop ebp
ret
Function at 0x40a9e3
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
je 0x40aa80
push ebx
push esi
call fcn.0040a9ac
xor ebx, ebx
sub eax, esi
push ebx
push ebx
push ebx
push ebx
sar eax, 1
push eax
push esi
push ebx
push ebx
mov dword [ebp - 8], eax
call fcn.0040a940
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x40aa2d
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x40aa7f
push edi
push eax
call fcn.0040b600
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x40aa4d
call fcn.004094a1
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x40aa7e
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.0040a940
add esp, 0x20
test eax, eax
jne 0x40aa6c
push edi
call fcn.004094a1
jmp 0x40aa74
push ebx
call fcn.004094a1
mov ebx, edi
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, ebx
pop edi
pop ebx
pop esi
leave
ret

Function at 0x40bd7d
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x438b68
push 0x438b60
push str.FlsAlloc
push 0x1f
call fcn.0040bc3c
mov esi, eax
add esp, 0x10
test esi, esi
je 0x40bdb1
push dword [ebp + 8]
mov ecx, esi
call dword [0x415160]
call esi
jmp 0x40bdb7
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x40bdfb
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x438b78
push 0x438b70
push str.FlsGetValue
push 0x21
call fcn.0040bc3c
mov esi, eax
add esp, 0x10
test esi, esi
je 0x40be32
push dword [ebp + 8]
mov ecx, esi
call dword [0x415160]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]

Function at 0x40be3a
Capabilities:
Set thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x438b80
push 0x438b78
push str.FlsSetValue
push 0x22
call fcn.0040bc3c
mov esi, eax
add esp, 0x10
test esi, esi
je 0x40be74
push dword [ebp + 0xc]
mov ecx, esi
push dword [ebp + 8]
call dword [0x415160]
call esi
pop esi
pop ebp
ret 8
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsSetValue]
Function at 0x401e50
Capabilities:
Create process on windows

Disassembly:
sub esp, 0x54
push edi
mov ecx, 0x10
xor eax, eax
lea edi, [esp + 0x18]
rep stosd dword es:[edi], eax
lea eax, [esp + 4]
lea ecx, [esp + 0x14]
mov edx, dword [esp + 0x5c]
push eax
push ecx
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push edx
mov dword [esp + 0x3c], 0x44
call dword [sym.imp.KERNEL32.DLL_CreateProcessA]
pop edi
add esp, 0x54
ret

Function at 0x402000
Capabilities:
Read file on windows

Disassembly:
mov edx, dword [esp + 8]
mov ecx, dword [ecx]
lea eax, [esp + 8]
push 0
push eax
mov eax, dword [esp + 0xc]
push edx
push eax
push ecx
call dword [sym.imp.KERNEL32.DLL_ReadFile]
mov eax, dword [esp + 8]
ret 8

Function at 0x402030
Capabilities:
Write file on windows

Disassembly:
mov edx, dword [esp + 8]
mov ecx, dword [ecx]
lea eax, [esp + 8]
push 0
push eax
mov eax, dword [esp + 0xc]
push edx
push eax
push ecx
call dword [sym.imp.KERNEL32.DLL_WriteFile]
ret 8

Function at 0x402000
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
mov dword [0x403010], 0x400000
push 0x7f02
push 0
call dword [sym.imp.user32.dll_LoadIconA]
sub esp, 8
mov dword [0x403014], eax
push 0x7f00
push 0
call dword [sym.imp.user32.dll_LoadCursorA]
sub esp, 8
mov dword [0x403018], eax
mov eax, section..data_1
mov dword [esp], eax
call dword [sym.imp.user32.dll_RegisterClassA]
sub esp, 4
test eax, eax
je 0x402111
mov dword [esp], 0
mov dword [esp + 4], 0x403059
mov dword [esp + 8], 0x40305e
mov dword [esp + 0xc], 0x10080000
mov dword [esp + 0x10], pe_nt_image_headers32
mov dword [esp + 0x14], pe_nt_image_headers32
mov dword [esp + 0x18], 0x100
mov dword [esp + 0x1c], 0xc0
mov dword [esp + 0x20], 0
mov dword [esp + 0x24], 0
mov eax, dword [0x403010]
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], 0
call dword [sym.imp.user32.dll_CreateWindowExA]
sub esp, 0x30
test eax, eax
je 0x402111
mov dword [esp], 0x403028
mov dword [esp + 4], 0
mov dword [esp + 8], 0
mov dword [esp + 0xc], 0
call dword [sym.imp.user32.dll_GetMessageA]
sub esp, 0x10
cmp eax, 1
jb 0x402111
jne 0x4020c0
mov dword [esp], 0x403028
call dword [sym.imp.user32.dll_TranslateMessage]
sub esp, 4
mov dword [esp], 0x403028
call dword [sym.imp.user32.dll_DispatchMessageA]
sub esp, 4
jmp 0x4020c0
leave
mov eax, dword [0x403030]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_ExitProcess]

Function at 0x40215d
Capabilities:
Query environment variable
Set environment variable
Terminate process

Disassembly:
mov byte [0x403063], al
push 0x403063
push 0x40305e
call dword [sym.imp.kernel32.dll_SetEnvironmentVariableA]
call fcn.004026a2
push 0
push 2
push 0x403080
push 0x403044
call dword [0x40568e]
cmp eax, 0x122
jne 0x4021b8
call fcn.00402120
pop eax
xor ebx, ebx
push edx
push 2
push 0x403065
push 0x40305e
call dword [sym.imp.kernel32.dll_GetEnvironmentVariableA]
mov bl, byte [0x403065]
pop edx
add edx, ebx
call edx
push 0
call dword [sym.imp.kernel32.dll_ExitProcess]

Function at 0x402685
Capabilities:
Allocate or change rwx memory

Disassembly:
push esi
push 0x40
push ebx
push eax
call dword [sym.imp.kernel32.dll_VirtualProtect]
ret
Function at 0x401e10
Capabilities:
Encode data using xor
Encrypt data using rc4 prga
Get windows directory from kuser_shared_data

Disassembly:
mov eax, dword [0x806a08]
sub esp, 0x20c
push ebp
mov ebp, ecx
push esi
push edi
test eax, eax
je 0x401fbd
cmp dword [0x806a0c], 0
jne 0x401fa9
xor eax, eax
push 0x100
push eax
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], eax
mov word [esp + 0x1c], ax
mov byte [esp + 0x1e], al
lea eax, [esp + 0x20]
push eax
call fcn.00403ce0
add esp, 0xc
xor edi, edi
xor eax, eax
nop
mov byte [esp + eax + 0x18], al
inc eax
cmp eax, 0x100
jb 0x401e60
xor esi, esi
mov edi, edi
mov dl, byte [esp + esi + 0x18]
mov eax, esi
and eax, 3
movzx ecx, dl
movzx eax, byte [eax + 0x41d0d4]
add eax, edi
add ecx, eax
movzx edi, cl
mov al, byte [esp + edi + 0x18]
mov byte [esp + esi + 0x18], al
inc esi
mov byte [esp + edi + 0x18], dl
cmp esi, 0x100
jb 0x401e70
xor esi, esi
xor edi, edi
xor edx, edx
lea eax, [esi + 1]
movzx esi, al
mov cl, byte [esp + esi + 0x18]
movzx eax, cl
add eax, edi
movzx edi, al
movzx eax, byte [esp + edi + 0x18]
mov byte [esp + esi + 0x18], al
mov byte [esp + edi + 0x18], cl
movzx eax, byte [esp + esi + 0x18]
movzx ecx, cl
add ecx, eax
movzx eax, cl
movzx eax, byte [esp + eax + 0x18]
xor al, byte [edx + 0x41d0d8]
mov byte [esp + edx + 0xc], al
inc edx
cmp edx, 0xb
jb 0x401ea5
push 0x200
lea eax, [esp + 0x1c]
push 0
push eax
call fcn.00403ce0
mov edx, 0x7ffe0030
add esp, 0xc
xor ecx, ecx
lea esi, [edx + 2]
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x401f04
sub edx, esi
sar edx, 1
je 0x401fbd
mov esi, ebp
lea edi, [esi + 1]
mov edi, edi
mov al, byte [esi]
inc esi
test al, al
jne 0x401f20
sub esi, edi
add edx, 0xc
add edx, esi
cmp edx, 0x200
ja 0x401fbd
xor eax, eax
push ebx
test edx, edx
je 0x401f58
movzx ebx, word [eax + eax + 0x7ffe0030]
test bx, bx
je 0x401f58
mov byte [esp + eax + 0x1c], bl
inc ecx
inc eax
cmp eax, edx
jb 0x401f41
xor eax, eax
test edx, edx
je 0x401f72
mov edi, edi
mov bl, byte [esp + eax + 0x10]
test bl, bl
je 0x401f72
mov byte [esp + ecx + 0x1c], bl
inc eax
inc ecx
cmp eax, edx
jb 0x401f60
xor eax, eax
test edx, edx
je 0x401f8f
lea ecx, [esp + ecx + 0x1c]
lea esp, [esp]
mov bl, byte [eax + ebp]
test bl, bl
je 0x401f8f
mov byte [ecx], bl
inc eax
inc ecx
cmp eax, edx
jb 0x401f80
push 8
push 0
lea eax, [esp + 0x24]
push eax
call dword [0x806a08]
pop ebx
pop edi
pop esi
pop ebp
add esp, 0x20c
ret
push 0x800
push 0
push ebp
call eax
pop edi
pop esi
pop ebp
add esp, 0x20c
ret
pop edi
pop esi
xor eax, eax
pop ebp
add esp, 0x20c
ret