joyce8/EMBER2024-capa huggingface dataset:
Function at 0x442980
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [ebp + 8]
push eax
call fcn.00442a50
add esp, 4
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 4]
cmp ecx, dword [ebp + 0xc]
jae 0x442a3c
cmp dword [ebp - 4], 0x50000000
jb 0x4429bc
cmp dword [ebp - 4], 0x80000000
ja 0x4429bc
mov dword [ebp - 4], 0x80010000
jmp 0x442995
push 0x1c
push 0
lea edx, [ebp - 0x20]
push edx
call fcn.004338d0
add esp, 0xc
push 0x1c
lea eax, [ebp - 0x20]
push eax
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
jne 0x4429e2
jmp 0x442a3c
cmp dword [ebp - 0x10], 0x10000
jne 0x442a25
cmp dword [ebp - 0x14], 0x10000
jb 0x442a25
push 0x40
push 0x3000
push 0x10000
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
je 0x442a18
mov eax, dword [ebp - 0x24]
jmp 0x442a3e
mov eax, dword [ebp - 4]
add eax, 0x10000
mov dword [ebp - 4], eax
jmp 0x442a37
mov ecx, dword [ebp - 0x20]
add ecx, dword [ebp - 0x14]
push ecx
call fcn.00442a50
add esp, 4
mov dword [ebp - 4], eax
jmp 0x442995
xor eax, eax
mov esp, ebp
pop ebp
ret

Function at 0x442a80
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [ebp + 0xc]
sub eax, 0x10000
push eax
call fcn.00442b50
add esp, 4
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 4]
cmp ecx, dword [ebp + 8]
jbe 0x442b44
cmp dword [ebp - 4], 0x50000000
jb 0x442ac1
cmp dword [ebp - 4], 0x80000000
ja 0x442ac1
mov dword [ebp - 4], 0x4fff0000
jmp 0x442a9a
push 0x1c
push 0
lea edx, [ebp - 0x20]
push edx
call fcn.004338d0
add esp, 0xc
push 0x1c
lea eax, [ebp - 0x20]
push eax
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
jne 0x442ae7
jmp 0x442b44
cmp dword [ebp - 0x10], 0x10000
jne 0x442b2a
cmp dword [ebp - 0x14], 0x10000
jb 0x442b2a
push 0x40
push 0x3000
push 0x10000
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
je 0x442b1d
mov eax, dword [ebp - 0x24]
jmp 0x442b46
mov eax, dword [ebp - 4]
sub eax, 0x10000
mov dword [ebp - 4], eax
jmp 0x442b3f
mov ecx, dword [ebp - 0x1c]
sub ecx, 0x10000
push ecx
call fcn.00442b50
add esp, 4
mov dword [ebp - 4], eax
jmp 0x442a9a
xor eax, eax
mov esp, ebp
pop ebp
ret
Function at 0x401600
Capabilities:
Create thread
Terminate process
Terminate thread

Disassembly:
sub esp, 0x214
mov eax, dword [0x45d740]
xor eax, esp
mov dword [esp + 0x20c], eax
push ebx
push esi
call fcn.0040d750
mov eax, dword [0x45ea30]
push 0x461a28
push eax
push str.g_nPort__d__g_szIp__s_
push 0x9f
push str..FileClient.cpp
push 0
mov ecx, str.StartSocket
call fcn.0040d010
mov ecx, dword [0x45ea30]
push 0x461a28
push ecx
push str.g_nPort__d__g_szIp__s_
push 0x9f
push str..FileClient.cpp
push 0
mov ecx, str.StartSocket
call fcn.0040cd30
add esp, 0x30
push 0
push 0
push 0
push 0x401490
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov esi, eax
push 0x7530
push esi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x4016f2
push 0
push esi
call dword [sym.imp.KERNEL32.dll_TerminateThread]
push 0x207
lea edx, [esp + 0xd]
push 0
push edx
mov byte [esp + 0x14], 0
call fcn.00435f30
add esp, 0xc
lea eax, [esp + 0x10c]
push 0
push eax
mov ebx, 0x451a58
call fcn.0040c680
add esp, 4
push eax
lea ecx, [esp + 0x10]
push ecx
mov ebx, 0x451a6c
call fcn.0040c680
add esp, 4
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]
mov ecx, dword [esp + 0x214]
xor eax, eax
cmp dword [0x45ea24], 0xffffffff
pop esi
setne al
pop ebx
xor ecx, esp
call fcn.00431676
add esp, 0x214
ret
Function at 0x402e20
Capabilities:
Get file system object information

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x168
mov eax, dword [0x45d740]
xor eax, esp
mov dword [esp + 0x164], eax
mov eax, dword [ebp + 8]
cmp eax, 0xffffffff
jne 0x402e49
mov eax, 0x80
jmp 0x402e4e
or eax, 0x80
push 0x4010
push 0x160
lea edx, [esp + 8]
push edx
push eax
push ecx
call dword [sym.imp.SHELL32.dll_SHGetFileInfoA]
mov ecx, dword [esp + 0x164]
mov eax, dword [esp + 4]
xor ecx, esp
call fcn.00431676
mov esp, ebp
pop ebp
ret
Function at 0x405de0
Capabilities:
Enumerate files on windows
Enumerate files recursively

Disassembly:
push 0xffffffffffffffff
push 0x44a69b
mov eax, dword fs:[0]
push eax
sub esp, 0x368
mov eax, dword [0x45d740]
xor eax, esp
mov dword [esp + 0x360], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x45d740]
xor eax, esp
push eax
lea eax, [esp + 0x37c]
mov dword fs:[0], eax
mov ebp, dword [esp + 0x38c]
push 0x104
lea eax, [esp + 0x168]
mov esi, ecx
push 0
push eax
mov dword [esp + 0x28], esi
call fcn.00435f30
add esp, 0xc
push ebp
call dword [sym.imp.KERNEL32.dll_lstrlenA]
cmp byte [eax + ebp - 1], 0x5c
mov ebx, 0x452254
jne 0x405e57
mov ebx, 0x451c5c
push ebx
push ebp
lea ecx, [esp + 0x16c]
push str._s_s.
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
lea edx, [esp + 0x24]
push edx
lea eax, [esp + 0x168]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
mov dword [esp + 0x20], eax
jne 0x405e92
xor al, al
jmp 0x405fac
cmp byte [esp + 0x50], 0x2e
je 0x405f7c
test byte [esp + 0x24], 0x10
je 0x405ed5
lea ecx, [esp + 0x50]
push ecx
push ebx
push ebp
lea edx, [esp + 0x278]
push str._s_s_s
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x14
lea eax, [esp + 0x26c]
push eax
mov ecx, esi
call fcn.00405de0
jmp 0x405f7c
call fcn.00412fcd
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
je 0x405f99
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x18], eax
lea ecx, [esp + 0x50]
push ecx
push ebx
push ebp
lea edx, [esp + 0x24]
push str._s_s_s
push edx
mov dword [esp + 0x398], 0
call fcn.0040b0d0
mov eax, dword [esi + 0xc4]
add esi, 0xbc
add esp, 0x14
push eax
mov eax, esi
call fcn.00401fe0
mov edi, eax
lea edx, [esp + 0x18]
lea ecx, [edi + 8]
push edx
call fcn.00402080
mov eax, dword [esi + 8]
test eax, eax
je 0x405f4b
mov dword [eax], edi
jmp 0x405f4e
mov dword [esi + 4], edi
mov dword [esp + 0x384], 0xffffffff
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
mov dword [esi + 8], edi
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x405f7c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov esi, dword [esp + 0x20]
lea ecx, [esp + 0x24]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
je 0x405fa3
mov esi, dword [esp + 0x1c]
jmp 0x405e92
push 0x80004005
call fcn.00402350
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov al, 1
mov ecx, dword [esp + 0x37c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x360]
xor ecx, esp
call fcn.00431676
add esp, 0x374
ret 4
Function at 0x408b70
Capabilities:
Delete directory
Delete file
Enumerate files on windows
Enumerate files recursively

Disassembly:
sub esp, 0x358
mov eax, dword [0x45d740]
xor eax, esp
mov dword [esp + 0x354], eax
push ebx
push ebp
push esi
mov esi, dword [esp + 0x368]
push edi
mov edi, dword [sym.imp.USER32.dll_wsprintfA]
push esi
lea eax, [esp + 0x25c]
push str._s.
push eax
mov ebx, ecx
call edi
add esp, 0xc
lea ecx, [esp + 0x10]
push ecx
lea edx, [esp + 0x25c]
push edx
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov ebp, eax
cmp ebp, 0xffffffff
jne 0x408bc8
xor al, al
jmp 0x408c35
cmp byte [esp + 0x3c], 0x2e
je 0x408c12
test byte [esp + 0x10], 0x10
lea eax, [esp + 0x3c]
push eax
push esi
lea ecx, [esp + 0x158]
push str._s_s
push ecx
je 0x408bff
call edi
add esp, 0x10
lea edx, [esp + 0x150]
push edx
mov ecx, ebx
call fcn.00408b70
jmp 0x408c12
call edi
add esp, 0x10
lea edx, [esp + 0x150]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
lea eax, [esp + 0x10]
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x408bc8
push ebp
call dword [sym.imp.KERNEL32.dll_FindClose]
push esi
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
test eax, eax
setne al
mov ecx, dword [esp + 0x364]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00431676
add esp, 0x358
ret 4
Function at 0x409f00
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xfffffffffffffffe
push 0x458fb8
push 0x4360d0
mov eax, dword fs:[0]
push eax
sub esp, 0x10
push ebx
push esi
push edi
mov eax, dword [0x45d740]
xor dword [ebp - 8], eax
xor eax, ebp
push eax
lea eax, [ebp - 0x10]
mov dword fs:[0], eax
mov dword [ebp - 0x18], esp
mov esi, ecx
mov dword [ebp - 4], 0
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
add eax, 1
push eax
call fcn.00431aa9
add esp, 4
mov edi, eax
mov dword [ebp - 0x20], edi
test edi, edi
je 0x40a066
push esi
push edi
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov esi, edi
mov dword [ebp - 0x1c], esi
cmp byte [edi], 0x5c
jne 0x409fbd
lea eax, [edi + 1]
cmp byte [eax], 0x5c
jne 0x409fbd
mov esi, eax
mov dword [ebp - 0x1c], esi
add esi, 1
mov dword [ebp - 0x1c], esi
mov al, byte [esi]
test al, al
je 0x409f96
cmp al, 0x5c
je 0x409f96
push esi
call dword [sym.imp.USER32.dll_CharNextA]
mov esi, eax
jmp 0x409f7e
cmp byte [esi], 0
je 0x409fa1
add esi, 1
mov dword [ebp - 0x1c], esi
mov al, byte [esi]
test al, al
je 0x409fb6
cmp al, 0x5c
je 0x409fb6
push esi
call dword [sym.imp.USER32.dll_CharNextA]
mov esi, eax
jmp 0x409f9e
cmp byte [esi], 0
je 0x409fe0
jmp 0x409fda
lea eax, [edi + 1]
cmp byte [eax], 0x3a
jne 0x409fe0
mov esi, eax
mov dword [ebp - 0x1c], esi
add esi, 1
mov dword [ebp - 0x1c], esi
mov al, byte [esi]
test al, al
je 0x409fe0
cmp al, 0x5c
jne 0x409fe0
add esi, 1
mov dword [ebp - 0x1c], esi
mov ebx, dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov al, byte [esi]
test al, al
je 0x40a02d
cmp al, 0x5c
jne 0x40a01f
mov byte [esi], 0
push edi
call ebx
cmp eax, 0xffffffff
jne 0x40a018
push 0
push edi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
jne 0x40a01c
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x40a01c
push edi
jmp 0x40a05e
test al, 0x10
je 0x40a015
mov byte [esi], 0x5c
push esi
call dword [sym.imp.USER32.dll_CharNextA]
mov esi, eax
mov dword [ebp - 0x1c], esi
jmp 0x409fe6
mov dword [ebp - 4], 0xfffffffe
push edi
call fcn.0043338e
add esp, 4
mov al, 1
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
call fcn.0043338e
add esp, 4
mov dword [ebp - 4], 0xfffffffe
xor al, al
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x40afb0
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
mov ebx, dword [esp + 8]
push edi
mov edi, dword [esp + 0x10]
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
jne 0x40afc9
pop edi
pop ebx
ret
push esi
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
je 0x40b004
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ecx, dword [esp + 0x18]
add eax, esi
and ecx, 0xf
jbe 0x40b000
lea ebx, [ebx]
cmp esi, eax
jae 0x40b004
sub ecx, 1
movzx edx, word [esi]
lea esi, [esi + edx*2 + 2]
jne 0x40aff0
cmp esi, eax
jb 0x40b00a
pop esi
pop edi
xor eax, eax
pop ebx
ret
mov ax, word [esi]
neg ax
sbb eax, eax
and eax, esi
pop esi
pop edi
pop ebx
ret
Function at 0x40bda0
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push 0xffffffffffffffff
push 0x44a940
mov eax, dword fs:[0]
push eax
sub esp, 0x2c
push ebx
push esi
push edi
mov eax, dword [0x45d740]
xor eax, esp
push eax
lea eax, [esp + 0x3c]
mov dword fs:[0], eax
lea ecx, [esp + 0x18]
call fcn.004109f7
xor ebx, ebx
mov dword [esp + 0x44], ebx
mov edi, vtable.CBitmap.0
mov dword [esp + 0x14], ebx
mov dword [esp + 0x10], edi
mov byte [esp + 0x44], 1
call fcn.0041d2c4
movzx ecx, word [esp + 0x54]
mov eax, dword [eax + 0xc]
push 0x2040
push ebx
push ebx
push ebx
push ecx
push eax
call dword [sym.imp.USER32.dll_LoadImageA]
push eax
lea ecx, [esp + 0x14]
call fcn.0041e475
test eax, eax
je 0x40bf12
mov eax, dword [esp + 0x14]
lea edx, [esp + 0x20]
push edx
push 0x18
push eax
call dword [sym.imp.GDI32.dll_GetObjectA]
test eax, eax
je 0x40bf12
mov ecx, dword [esp + 0x24]
mov eax, 0x2aaaaaab
imul ecx
mov ecx, dword [esp + 0x34]
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
xor edx, edx
mov dh, byte [ecx]
push ebx
push eax
push 0x19
mov dl, byte [ecx + 1]
movzx ecx, byte [ecx + 2]
shl edx, 8
or edx, ecx
mov esi, edx
mov edx, dword [esp + 0x34]
push edx
push 0x18
lea ecx, [esp + 0x2c]
call fcn.00410d89
test eax, eax
je 0x40bf12
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x1c]
push esi
push eax
push ecx
call fcn.0041d2c4
mov edx, dword [eax + 0x78]
mov ecx, dword [edx]
call fcn.0040c3d0
or esi, 0xffffffff
cmp eax, esi
jne 0x40beaf
mov byte [esp + 0x44], bl
lea ecx, [esp + 0x10]
mov dword [esp + 0x10], edi
call fcn.0040c550
mov dword [esp + 0x44], esi
jmp 0x40bf2b
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x50]
mov edx, dword [esp + 0x4c]
push eax
mov eax, dword [edx + 0x20]
push ebx
push ecx
push eax
call dword [sym.imp.USER32.dll_SendMessageA]
lea ecx, [esp + 0x18]
call fcn.00410c98
lea ecx, [esp + 0x10]
call fcn.0041e49e
mov byte [esp + 0x44], bl
lea ecx, [esp + 0x10]
mov dword [esp + 0x10], edi
call fcn.0040c550
lea ecx, [esp + 0x18]
mov dword [esp + 0x44], esi
call fcn.00410e36
mov eax, 1
mov ecx, dword [esp + 0x3c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
add esp, 0x38
ret 0xc
mov byte [esp + 0x44], bl
lea ecx, [esp + 0x10]
mov dword [esp + 0x10], edi
call fcn.0040c550
mov dword [esp + 0x44], 0xffffffff
lea ecx, [esp + 0x18]
call fcn.00410e36
xor eax, eax
mov ecx, dword [esp + 0x3c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
add esp, 0x38
ret 0xc
Function at 0x40c680
Capabilities:
Read .ini file

Disassembly:
sub esp, 0x148
mov eax, dword [0x45d740]
xor eax, esp
mov dword [esp + 0x144], eax
mov ax, word [0x452ff4]
mov cl, byte [0x452ff6]
push ebp
mov ebp, dword [esp + 0x150]
push 0x3d
lea edx, [esp + 0xb]
push 0
push edx
mov word [esp + 0x10], ax
mov byte [esp + 0x12], cl
call fcn.00435f30
add esp, 0xc
test ebx, ebx
je 0x40c7d5
cmp byte [ebx], 0
je 0x40c7d5
test ebp, ebp
je 0x40c7d5
push esi
push edi
lea edi, [esp + 0xc]
call fcn.0040d4f0
push 0x103
lea eax, [esp + 0x51]
push 0
push eax
mov byte [esp + 0x58], 0
call fcn.00435f30
add esp, 0xc
lea eax, [esp + 0x4c]
call fcn.0040d5c0
lea eax, [esp + 0x4c]
add eax, 0xffffffff
nop
mov cl, byte [eax + 1]
add eax, 1
test cl, cl
jne 0x40c710
mov ecx, dword [str.Isagent_]
mov edx, dword [0x452ffc]
mov dword [eax], ecx
mov cx, word [0x453000]
mov dword [eax + 4], edx
mov word [eax + 8], cx
lea eax, [esp + 0xc]
mov edx, eax
lea esp, [esp]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x40c740
lea edi, [esp + 0x4c]
sub eax, edx
add edi, 0xffffffff
mov cl, byte [edi + 1]
add edi, 1
test cl, cl
jne 0x40c752
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea eax, [esp + 0x4c]
pop edi
add eax, 0xffffffff
pop esi
mov cl, byte [eax + 1]
add eax, 1
test cl, cl
jne 0x40c775
mov edx, dword [str..langue]
mov ecx, dword [0x453008]
mov dword [eax], edx
lea edx, [esp + 0x44]
push edx
push 0x104
push ebp
push ebx
push ebx
push str.StringMap
mov dword [eax + 4], ecx
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
cmp byte [ebp], 0
jne 0x40c7bd
push 0x104
push ebx
push ebp
call fcn.00433cd5
add esp, 0xc
mov eax, ebp
pop ebp
mov ecx, dword [esp + 0x144]
xor ecx, esp
call fcn.00431676
add esp, 0x148
ret
mov ecx, dword [esp + 0x148]
pop ebp
xor ecx, esp
xor eax, eax
call fcn.00431676
add esp, 0x148
ret
Function at 0x40c7f0
Capabilities:
Create tcp socket
Initialize winsock library
Set socket configuration

Disassembly:
sub esp, 0x1b0
mov eax, dword [0x45d740]
xor eax, esp
mov dword [esp + 0x1ac], eax
push esi
push edi
lea eax, [esp + 0x20]
push eax
push 0x202
mov dword [esp + 0x10], 0x8000
call dword [sym.imp.WS2_32.dll_WSAStartup]
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov esi, eax
cmp esi, 0xffffffff
jne 0x40c84b
or eax, 0xffffffff
pop edi
pop esi
mov ecx, dword [esp + 0x1ac]
xor ecx, esp
call fcn.00431676
add esp, 0x1b0
ret
push 0
call dword [sym.imp.WS2_32.dll_htonl]
mov ecx, dword [esp + 0x1bc]
push ecx
mov dword [esp + 0x18], eax
mov word [esp + 0x14], 2
call dword [sym.imp.WS2_32.dll_htons]
mov edi, dword [sym.imp.WS2_32.dll_setsockopt]
push 4
lea edx, [esp + 0x10]
push edx
push 4
push 0xffff
push esi
mov word [esp + 0x26], ax
mov dword [esp + 0x20], 1
call edi
push 0x10
lea eax, [esp + 0x14]
push eax
push esi
call dword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
je 0x40c831
push 1
push esi
call dword [sym.imp.WS2_32.dll_listen]
push 4
lea ecx, [esp + 0xc]
push ecx
push 0x1002
push 0xffff
push esi
call edi
push 4
lea edx, [esp + 0xc]
push edx
push 0x1001
push 0xffff
push esi
call edi
mov ecx, dword [esp + 0x1b4]
pop edi
mov eax, esi
pop esi
xor ecx, esp
call fcn.00431676
add esp, 0x1b0
ret

Function at 0x40c8f0
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Initialize winsock library

Disassembly:
sub esp, 0x1ac
mov eax, dword [0x45d740]
xor eax, esp
mov dword [esp + 0x1a4], eax
push esi
push edi
mov edi, dword [0x45ea30]
lea eax, [esp + 0x18]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov esi, eax
cmp esi, 0xffffffff
je 0x40c983
cmp edi, 0xffff
ja 0x40c983
push edi
mov word [esp + 0xc], 2
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0xa], ax
call fcn.0040cc00
push eax
call dword [sym.imp.WS2_32.dll_htonl]
push 0x10
lea ecx, [esp + 0xc]
push ecx
push esi
mov dword [esp + 0x18], eax
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x40c99d
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push esi
mov edi, eax
call dword [sym.imp.WS2_32.dll_closesocket]
push edi
call dword [sym.imp.WS2_32.dll_WSASetLastError]
or eax, 0xffffffff
pop edi
pop esi
mov ecx, dword [esp + 0x1a4]
xor ecx, esp
call fcn.00431676
add esp, 0x1ac
ret
mov ecx, dword [esp + 0x1ac]
pop edi
mov eax, esi
pop esi
xor ecx, esp
call fcn.00431676
add esp, 0x1ac
ret
Function at 0x40ca40
Capabilities:
Send data
Send data on socket

Disassembly:
push ebx
push ebp
mov ebp, dword [0x45ea24]
push esi
mov esi, dword [esp + 0x10]
cmp esi, 0xffffffff
push edi
mov edi, eax
jne 0x40ca69
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x40ca58
sub eax, edx
mov dword [esp + 0x14], eax
mov esi, eax
test esi, esi
jle 0x40ca8a
mov ebx, dword [sym.imp.WS2_32.dll_send]
push 0
push esi
push edi
push ebp
call ebx
test eax, eax
jle 0x40ca91
sub esi, eax
add edi, eax
test esi, esi
jg 0x40ca73
mov esi, dword [esp + 0x14]
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
ret
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
ret

Function at 0x40cc00
Capabilities:
Initialize winsock library
Resolve dns

Disassembly:
sub esp, 0x1ac
mov eax, dword [0x45d740]
xor eax, esp
mov dword [esp + 0x1a4], eax
push 0x461a28
call dword [sym.imp.WS2_32.dll_inet_addr]
cmp eax, 0xffffffff
mov dword [esp + 4], eax
jne 0x40cc96
lea eax, [esp + 0x10]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
push 0x461a28
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
je 0x40cc7f
movsx ecx, word [eax + 0xa]
mov edx, dword [eax + 0xc]
mov eax, dword [edx]
push ecx
push eax
lea ecx, [esp + 0xc]
push ecx
call fcn.00438d50
mov edx, dword [esp + 0x10]
add esp, 0xc
push edx
call dword [sym.imp.WS2_32.dll_ntohl]
mov ecx, dword [esp + 0x1a4]
xor ecx, esp
call fcn.00431676
add esp, 0x1ac
ret
xor eax, eax
mov ecx, dword [esp + 0x1a4]
xor ecx, esp
call fcn.00431676
add esp, 0x1ac
ret
call fcn.0040caa0
mov ecx, dword [esp + 0x1a4]
xor ecx, esp
call fcn.00431676
add esp, 0x1ac
ret

Function at 0x40d470
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0xc
lea eax, [esp]
push eax
push 0x20019
push 0
push str.SOFTWARELcDebug
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [esp + 0x1c], 4
mov dword [esp + 0x18], 0xffffffff
mov dword [esp + 0x14], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40d4dd
push esi
lea ecx, [esp + 0xc]
push ecx
lea edx, [esp + 0xc]
push edx
push eax
push eax
mov eax, dword [esp + 0x14]
push str.LogFile
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov esi, eax
mov eax, dword [esp + 4]
test eax, eax
je 0x40d4d8
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
pop esi
jne 0x40d4e5
mov eax, dword [esp + 4]
add esp, 0xc
ret
or eax, 0xffffffff
add esp, 0xc
ret
Function at 0x40d4f0
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 8
lea eax, [esp + 4]
push eax
push 0x20019
push 0
push str.SOFTWAREISADB
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [esp + 0x18], reloc.OLEAUT32.dll_SysReAllocString
mov dword [esp + 0x14], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x40d529
xor eax, eax
add esp, 8
ret
mov edx, dword [esp + 4]
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
lea ecx, [esp + 4]
push ecx
push 0
push 0
push 0
push str.Langue
push edx
call esi
test eax, eax
jne 0x40d5a7
test edi, edi
jne 0x40d556
add dword [esp + 4], 1
jmp 0x40d5a7
cmp dword [esp + 4], 0x3f
jbe 0x40d565
mov dword [esp + 4], 0x3f
mov ecx, dword [esp + 8]
lea eax, [esp + 4]
push eax
push edi
push 0
push 0
push str.Langue
push ecx
call esi
cmp eax, 0xea
jne 0x40d59b
mov eax, dword [esp + 8]
test eax, eax
je 0x40d591
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, 0x3f
pop esi
add esp, 8
ret
test eax, eax
je 0x40d5a7
mov dword [esp + 4], 0
mov eax, dword [esp + 8]
test eax, eax
je 0x40d5b6
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [esp + 4]
pop esi
add esp, 8
ret

Function at 0x40d5c0
Capabilities:
Get common file path

Disassembly:
push ecx
push esi
push edi
push str.IsWow64Process
push str.kernel32
mov esi, eax
mov dword [esp + 0x10], 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov edi, eax
test edi, edi
je 0x40d5f8
lea eax, [esp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call edi
cmp dword [esp + 8], 0
push 0x104
push esi
jne 0x40d60f
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
pop edi
pop esi
pop ecx
ret
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
add esi, 0xffffffff
mov ecx, esi
lea ebx, [ebx]
mov dl, byte [ecx + 1]
add ecx, 1
test dl, dl
jne 0x40d620
mov edx, dword [str.SysWOW64]
mov dword [ecx], edx
mov edx, dword [0x453190]
mov dword [ecx + 4], edx
mov dx, word [0x453194]
pop edi
mov word [ecx + 8], dx
add eax, 9
pop esi
pop ecx
ret