joyce8/EMBER2024-capa huggingface dataset:
Function at 0x413034
Capabilities:
Initialize winsock library

Disassembly:
sub esp, 0x194
mov eax, dword [0x422a68]
mov dword [esp + 0x190], eax
lea eax, [esp]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x413066
push eax
push str.Unable_to_initialize_socket_library__error__d_n
call fcn.00411378
pop ecx
pop ecx
mov ecx, dword [esp + 0x190]
call fcn.00414215
add esp, 0x194
ret

Function at 0x4131d6
Capabilities:
Create tcp socket
Create udp socket

Disassembly:
mov eax, 0x4164a8
call fcn.00414110
sub esp, 0x24
push esi
mov esi, ecx
lea ecx, [esi + 0xc]
mov dword [ebp - 0x10], esi
mov dword [esi], 0x41d94c
call fcn.004130b8
and dword [ebp - 4], 0
push 6
push 1
push 2
mov byte [esi + 0x14], 0
call dword [sym.imp.WS2_32.dll_socket]
cmp eax, 0xffffffff
mov dword [esi + 4], eax
jne 0x41322e
push str.socket___failed
lea ecx, [ebp - 0x30]
call fcn.00413b08
push 0x420598
lea eax, [ebp - 0x30]
push eax
call sub.MSVCR71.dll__CxxThrowException
mov ecx, dword [ebp - 0xc]
mov dword [esi + 8], bind
mov eax, esi
pop esi
mov dword fs:[0], ecx
leave
ret

Function at 0x413333
Capabilities:
Connect socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push 0x10
push dword [ebp + 8]
push dword [ecx + 4]
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x413380
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x274d
lea ecx, [ebp - 0x20]
jne 0x413368
call fcn.0041393b
push 0x42073c
jmp 0x413377
push str.connect___failed
call fcn.00413b08
push 0x420598
lea eax, [ebp - 0x20]
push eax
call sub.MSVCR71.dll__CxxThrowException
leave
ret 4

Function at 0x4133c5
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x12c
push esi
mov esi, dword [ebp + 0xc]
push edi
mov eax, esi
cdq
mov edi, 0x3e8
idiv edi
sub esi, 0x7fffffff
imul edx, edx, 0x3e8
mov dword [ebp - 8], eax
neg esi
sbb esi, esi
lea eax, [ebp - 8]
and esi, eax
mov eax, dword [ecx + 4]
mov dword [ebp - 0x128], eax
mov eax, dword [ebp + 8]
mov ecx, eax
xor edi, edi
inc edi
dec ecx
neg ecx
sbb ecx, ecx
mov dword [ebp - 4], edx
push esi
not ecx
lea edx, [ebp - 0x12c]
and ecx, edx
neg eax
push 0
push ecx
sbb eax, eax
not eax
mov ecx, edx
and eax, ecx
push eax
push edi
mov dword [ebp - 0x12c], edi
call dword [sym.imp.WS2_32.dll_select]
cmp eax, 0xffffffff
je 0x413450
test eax, eax
je 0x413441
cmp eax, edi
jne 0x413450
xor ecx, ecx
cmp eax, edi
sete cl
pop edi
mov al, cl
pop esi
leave
ret 8
push str.select___failed
lea ecx, [ebp - 0x28]
call fcn.00413b08
push 0x420598
lea eax, [ebp - 0x28]
push eax
call sub.MSVCR71.dll__CxxThrowException
int3

Function at 0x413c03
Capabilities:
Create thread

Disassembly:
push ecx
push esi
lea eax, [esp + 4]
push eax
push 0
mov esi, ecx
push esi
push 0x413b92
push 0
push 0
call dword [sym.imp.MSVCR71.dll__beginthreadex]
add esp, 0x18
test eax, eax
mov dword [esi + 4], eax
pop esi
jne 0x413c49
call dword [sym.imp.MSVCR71.dll__errno]
push dword [eax]
call dword [sym.imp.MSVCR71.dll_strerror]
push eax
push str.Unable_to_start_thread:__s_n
call fcn.004110c4
add esp, 0xc
xor al, al
pop ecx
ret
mov al, 1
pop ecx
ret
Function at 0x414338
Capabilities:
Parse pe header

Disassembly:
push 0x28
push 0x41da30
call fcn.0041422c
xor edi, edi
push edi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
cmp word [eax], 0x5a4d
jne 0x414373
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x414373
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x41438b
cmp eax, 0x20b
je 0x414378
mov dword [ebp - 0x1c], edi
jmp 0x41439f
cmp dword [ecx + 0x84], 0xe
jbe 0x414373
xor eax, eax
cmp dword [ecx + 0xf8], edi
jmp 0x414399
cmp dword [ecx + 0x74], 0xe
jbe 0x414373
xor eax, eax
cmp dword [ecx + 0xe8], edi
setne al
mov dword [ebp - 0x1c], eax
mov dword [ebp - 4], edi
push 1
call dword [sym.imp.MSVCR71.dll___set_app_type]
pop ecx
or dword [0x422f58], 0xffffffff
or dword [0x422f5c], 0xffffffff
call dword [sym.imp.MSVCR71.dll___p__fmode]
mov ecx, dword [0x422e34]
mov dword [eax], ecx
call dword [sym.imp.MSVCR71.dll___p__commode]
mov ecx, dword [0x422e30]
mov dword [eax], ecx
mov eax, dword [sym.imp.MSVCR71.dll__adjust_fdiv]
mov eax, dword [eax]
mov dword [0x422f54], eax
call fcn.00414612
call fcn.004146b2
cmp dword [0x422a70], edi
jne 0x4143ff
push fcn.004146b2
call dword [sym.imp.MSVCR71.dll___setusermatherr]
pop ecx
call fcn.004146a0
push 0x422044
push 0x422040
call sub.MSVCR71.dll__initterm
push 0x414656
call fcn.004141d2
mov eax, dword [0x422e2c]
mov dword [ebp - 0x24], eax
lea eax, [ebp - 0x24]
push eax
push dword [0x422e28]
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x2c]
push eax
call dword [sym.imp.MSVCR71.dll___getmainargs]
add esp, 0x20
mov dword [ebp - 0x34], eax
cmp eax, edi
jge 0x414453
push 8
call sub.MSVCR71.dll__amsg_exit
pop ecx
push 0x42203c
push section..data
call sub.MSVCR71.dll__initterm
call dword [sym.imp.MSVCR71.dll___p___initenv]
mov ecx, dword [ebp - 0x20]
mov dword [eax], ecx
push dword [ebp - 0x20]
push dword [ebp - 0x28]
push dword [ebp - 0x2c]
call fcn.00407102
add esp, 0x14
mov esi, eax
mov dword [ebp - 0x38], esi
cmp dword [ebp - 0x1c], edi
jne 0x41448f
push esi
call dword [sym.imp.MSVCR71.dll_exit]
call dword [sym.imp.MSVCR71.dll__cexit]
jmp 0x4144c4
or dword [ebp - 4], 0xffffffff
mov eax, esi
call fcn.00414267
ret
Function at 0x40a3d0
Capabilities:
Get thread local storage value

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x1c
mov dword [esp], 0x41d5b8
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ebx, dword [0x41d5b0]
sub esp, 4
mov ebp, dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
test ebx, ebx
je 0x40a425
lea esi, [esi]
mov eax, dword [ebx]
mov dword [esp], eax
call ebp
sub esp, 4
mov esi, eax
call edi
test eax, eax
jne 0x40a41e
test esi, esi
je 0x40a41e
mov eax, dword [ebx + 4]
mov dword [esp], esi
call eax
mov ebx, dword [ebx + 8]
test ebx, ebx
jne 0x40a400
mov dword [esp], 0x41d5b8
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 4
add esp, 0x1c
pop ebx
pop esi
pop edi
pop ebp
ret

Function at 0x40a680
Capabilities:
Enumerate pe sections

Disassembly:
push esi
push ebx
mov edx, dword [esp + 0xc]
mov ebx, dword [esp + 0x10]
add edx, dword [edx + 0x3c]
movzx esi, word [edx + 6]
movzx eax, word [edx + 0x14]
test esi, esi
lea eax, [edx + eax + 0x18]
je 0x40a6b8
xor ecx, ecx
nop
mov edx, dword [eax + 0xc]
cmp edx, ebx
ja 0x40a6ae
add edx, dword [eax + 8]
cmp ebx, edx
jb 0x40a6ba
add ecx, 1
add eax, 0x28
cmp ecx, esi
jne 0x40a6a0
xor eax, eax
pop ebx
pop esi
ret

Function at 0x430878
Capabilities:
Generate random numbers using the delphi lcg

Disassembly:
push ebx
xor ebx, ebx
imul edx, dword [ebx + 0x40d008], 0x8088405
inc edx
mov dword [ebx + 0x40d008], edx
mul edx
mov eax, edx
pop ebx
ret
Function at 0x401059
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push esi
push dword [esp + 0xc]
mov esi, eax
push dword [esp + 0xc]
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
jne 0x401070
pop esi
ret
push edi
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
test edi, edi
je 0x4010a5
push dword [esp + 0x10]
push dword [esp + 0x10]
call dword [sym.imp.KERNEL32.dll_SizeofResource]
add eax, edi
and esi, 0xf
jbe 0x4010a1
cmp edi, eax
jae 0x4010a5
dec esi
movzx ecx, word [edi]
lea edi, [edi + ecx*2 + 2]
jne 0x401093
cmp edi, eax
jb 0x4010a9
xor eax, eax
jmp 0x4010b3
mov ax, word [edi]
neg ax
sbb eax, eax
and eax, edi
pop edi
pop esi
ret
Function at 0x401138
Capabilities:
Get common file path
Get program files directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x40a010]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [0x40ad8c]
push ebx
push esi
mov ebx, 0x40ad8c
push edi
mov ecx, ebx
call dword [eax + 0xc]
or dword [ebp - 0x14], 0xffffffff
add eax, 0x10
mov dword [ebp - 8], eax
lea eax, [ebp - 8]
mov edi, 0x104
push edi
mov esi, eax
mov dword [ebp - 0x1c], eax
call fcn.0040169b
push edi
push eax
push 0
mov dword [ebp - 0x18], eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea ecx, [ebp - 0x1c]
mov esi, eax
call fcn.0040167b
test esi, esi
je 0x4012bb
cmp esi, edi
ja 0x4012bb
mov eax, dword [0x40ad8c]
mov esi, dword [ebp - 8]
mov ecx, ebx
call dword [eax + 0xc]
add eax, 0x10
test esi, esi
mov dword [ebp - 0xc], eax
je 0x4011cc
test esi, 0xffff0000
jne 0x4011cc
movzx eax, si
push eax
lea eax, [ebp - 0xc]
push eax
call fcn.004017a6
jmp 0x4011d6
push esi
lea eax, [ebp - 0xc]
push eax
call fcn.00401618
mov eax, dword [ebp - 0xc]
push dword [eax - 0xc]
lea esi, [ebp - 0xc]
call fcn.0040169b
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
mov esi, dword [ebp - 0xc]
test esi, esi
jne 0x4011f6
xor eax, eax
jmp 0x4011fd
push esi
call fcn.004039b8
pop ecx
lea edx, [ebp - 0xc]
call fcn.00401729
lea eax, [esi - 0x10]
mov dword [ebp - 0xc], eax
call fcn.0040174a
mov esi, dword [ebp - 8]
add eax, 0x10
lea ecx, [eax - 0x10]
add esi, 0xfffffff0
cmp ecx, esi
mov dword [ebp - 0x20], ecx
je 0x40125c
cmp dword [esi + 0xc], 0
jl 0x40124b
mov edx, dword [ecx]
cmp edx, dword [esi]
jne 0x40124b
mov eax, ecx
call fcn.0040174a
mov dword [ebp - 0x24], eax
mov eax, esi
call fcn.004010b6
mov eax, dword [ebp - 0x24]
add eax, 0x10
mov dword [ebp - 8], eax
jmp 0x40125c
mov ebx, dword [eax - 0xc]
push eax
lea eax, [ebp - 8]
call fcn.004016c1
mov ebx, 0x40ad8c
mov eax, dword [ebp - 0x20]
call fcn.004010b6
mov eax, dword [0x40ad8c]
mov ecx, ebx
call dword [eax + 0xc]
or dword [ebp - 0x14], 0xffffffff
add eax, 0x10
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x10]
push edi
mov esi, eax
mov dword [ebp - 0x1c], eax
call fcn.0040169b
push eax
xor esi, esi
push esi
push esi
push 0x26
push esi
mov dword [ebp - 0x18], eax
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
lea ecx, [ebp - 0x1c]
setl bl
call fcn.0040167b
test bl, bl
je 0x4012d7
mov eax, dword [ebp - 0x10]
add eax, 0xfffffff0
call fcn.004010b6
mov eax, dword [ebp - 0xc]
call fcn.004010b6
mov eax, dword [ebp - 8]
add eax, 0xfffffff0
call fcn.004010b6
xor al, al
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004039ce
leave
ret
lea eax, [ebp - 0x10]
call fcn.00401641
lea eax, [ebp - 8]
call fcn.00401641
mov ebx, dword [ebp - 0x10]
cmp ebx, esi
je 0x4012ff
mov edi, dword [ebp - 8]
cmp dword [edi - 0xc], esi
jl 0x4012ff
call fcn.004019c9
test eax, eax
jne 0x401304
or esi, 0xffffffff
jmp 0x40130b
sub eax, dword [ebp - 8]
sar eax, 1
mov esi, eax
mov eax, dword [ebp - 0x10]
add eax, 0xfffffff0
call fcn.004010b6
mov eax, dword [ebp - 0xc]
call fcn.004010b6
mov eax, dword [ebp - 8]
add eax, 0xfffffff0
call fcn.004010b6
test esi, esi
sete al
jmp 0x4012c8
Function at 0x401330
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [0x40a010]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
lea eax, [ebp - 0xc]
push eax
xor ebx, ebx
xor eax, eax
cmp byte [ebp + 8], bl
push 0x20019
setne al
push ebx
push 0x40d390
mov esi, ecx
mov dword [ebp - 0xc], ebx
add eax, 0x80000001
push eax
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
cmp eax, ebx
je 0x40137e
jle 0x4013dc
and eax, 0xffff
or eax, 0x80070000
jmp 0x4013dc
or dword [ebp - 0x14], 0xffffffff
push 0x32
pop eax
push eax
mov dword [ebp - 8], ebx
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x1c], esi
call fcn.0040169b
lea ecx, [ebp - 0x10]
push ecx
push eax
mov dword [ebp - 0x18], eax
lea eax, [ebp - 8]
push eax
push ebx
push 0x40d314
push dword [ebp - 0xc]
call dword [sym.imp.SHLWAPI.dll_SHQueryValueExW]
lea ecx, [ebp - 0x1c]
mov esi, eax
call fcn.0040167b
cmp esi, ebx
je 0x4013cf
jle 0x4013cb
and esi, 0xffff
or esi, 0x80070000
mov eax, esi
jmp 0x4013dc
mov eax, dword [ebp - 8]
dec eax
neg eax
sbb eax, eax
and eax, 0x8000ffff
mov ecx, dword [ebp - 4]
pop esi
xor ecx, ebp
pop ebx
call fcn.004039ce
leave
ret

Function at 0x401569
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [0x40a010]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 8]
call fcn.00401138
mov byte [ebp - 0xc], al
mov eax, dword [0x40ad8c]
mov ecx, 0x40ad8c
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 8], eax
lea eax, [ebp - 8]
push eax
push dword [ebp - 0xc]
mov ecx, esi
call fcn.004013ea
test eax, eax
mov ebx, dword [ebp - 8]
pop ecx
pop ecx
jge 0x4015cc
mov esi, eax
lea eax, [ebx - 0x10]
call fcn.004010b6
mov ecx, dword [ebp - 4]
mov eax, esi
pop esi
xor ecx, ebp
pop ebx
call fcn.004039ce
leave
ret 0x10
push 0
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov esi, eax
test esi, esi
jne 0x4015e4
call fcn.004010ce
jmp 0x4015b0
push edi
push 0x40d308
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov edi, eax
test edi, edi
je 0x401607
push dword [ebp + 0x14]
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
push eax
call edi
mov edi, eax
jmp 0x40160c
mov edi, 0x80004005
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov esi, edi
pop edi
jmp 0x4015b2
Function at 0x401f34
Capabilities:
Check os version

Disassembly:
push ebp
lea ebp, [esp - 0x78]
sub esp, 0x98
mov eax, dword [0x40a010]
xor eax, ebp
mov dword [ebp + 0x74], eax
push esi
mov esi, ecx
call fcn.00401e73
mov eax, 0x400000
push 0x94
mov dword [esi + 8], eax
mov dword [esi + 4], eax
lea eax, [ebp - 0x20]
push 0
push eax
mov dword [esi], 0x3c
mov byte [esi + 0xc], 0
call fcn.00403cc0
add esp, 0xc
lea eax, [ebp - 0x20]
push eax
mov dword [ebp - 0x20], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
cmp dword [ebp - 0x10], 2
jne 0x401f83
cmp dword [ebp - 0x1c], 5
jb 0x401f9b
jmp 0x401f97
cmp dword [ebp - 0x10], 1
jne 0x401f9b
cmp dword [ebp - 0x1c], 4
ja 0x401f97
jne 0x401f9b
cmp dword [ebp - 0x18], 0
jbe 0x401f9b
mov byte [esi + 0xc], 1
lea ecx, [esi + 0x18]
mov dword [esi + 0x10], 0x800
mov dword [esi + 0x14], 0x40c1dc
call fcn.00401d09
test eax, eax
jge 0x401fbc
mov byte [0x40b910], 1
mov ecx, dword [ebp + 0x74]
mov eax, esi
xor ecx, ebp
pop esi
call fcn.004039ce
add ebp, 0x78
leave
ret

Function at 0x4039ce
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x40a010]
jne 0x4039d8
repz ret
jmp fcn.00404ad5
Function at 0x404f40
Capabilities:
Write file on windows

Disassembly:
push ecx
push ebx
mov ebx, dword [esp + 0xc]
push esi
push edi
xor esi, esi
xor edi, edi
cmp ebx, dword [edi*8 + 0x40a198]
je 0x404f5b
inc edi
cmp edi, 0x17
jb 0x404f4c
cmp edi, 0x17
jae 0x4050db
push ebp
push 3
call fcn.00407cd0
cmp eax, 1
pop ecx
je 0x4050a7
push 3
call fcn.00407cd0
test eax, eax
pop ecx
jne 0x404f8f
cmp dword [section..data], 1
je 0x4050a7
cmp ebx, 0xfc
je 0x4050da
push 0x40c7e0
mov ebx, 0x314
push ebx
mov ebp, 0x40b128
push ebp
call fcn.00407c6b
add esp, 0xc
test eax, eax
je 0x404fc5
push esi
push esi
push esi
push esi
push esi
call fcn.00404291
add esp, 0x14
push 0x104
mov esi, 0x40b141
push esi
push 0
mov byte [0x40b245], 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x405009
push 0x40c7c8
push 0x2fb
push esi
call fcn.00407c6b
add esp, 0xc
test eax, eax
je 0x405009
xor eax, eax
push eax
push eax
push eax
push eax
push eax
call fcn.00404291
add esp, 0x14
push esi
call fcn.00407be0
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x40504e
push esi
call fcn.00407be0
sub esi, 0x3b
add eax, esi
push 3
mov ecx, 0x40b43c
push 0x40c7c4
sub ecx, eax
push ecx
push eax
call fcn.00407b25
add esp, 0x14
test eax, eax
je 0x40504e
xor esi, esi
push esi
push esi
push esi
push esi
push esi
call fcn.00404291
add esp, 0x14
jmp 0x405050
xor esi, esi
push 0x40c7c0
push ebx
push ebp
call fcn.00407ab4
add esp, 0xc
test eax, eax
je 0x405070
push esi
push esi
push esi
push esi
push esi
call fcn.00404291
add esp, 0x14
push dword [edi*8 + 0x40a19c]
push ebx
push ebp
call fcn.00407ab4
add esp, 0xc
test eax, eax
je 0x405092
push esi
push esi
push esi
push esi
push esi
call fcn.00404291
add esp, 0x14
push 0x12010
push 0x40c798
push ebp
call fcn.004078f7
add esp, 0xc
jmp 0x4050da
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov ebp, eax
cmp ebp, esi
je 0x4050da
cmp ebp, 0xffffffff
je 0x4050da
push 0
lea eax, [esp + 0x14]
push eax
lea esi, [edi*8 + 0x40a19c]
push dword [esi]
call fcn.00407be0
pop ecx
push eax
push dword [esi]
push ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop ebp
pop edi
pop esi
pop ebx
pop ecx
ret
Function at 0x4078f7
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
push edi
call fcn.00405b05
xor ebx, ebx
cmp dword [0x40b7f4], ebx
mov dword [ebp - 8], eax
mov dword [ebp - 4], ebx
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x10], ebx
jne 0x4079cd
push 0x40c900
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x407aad
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x40c8f4
push edi
call esi
cmp eax, ebx
je 0x407aad
push eax
call fcn.00405a97
mov dword [esp], 0x40c8e4
push edi
mov dword [0x40b7f4], eax
call esi
push eax
call fcn.00405a97
mov dword [esp], 0x40c8d0
push edi
mov dword [0x40b7f8], eax
call esi
push eax
call fcn.00405a97
mov dword [0x40b7fc], eax
lea eax, [ebp - 0xc]
push eax
call fcn.00404ccd
test eax, eax
pop ecx
pop ecx
je 0x40799b
push ebx
push ebx
push ebx
push ebx
push ebx
call fcn.00404291
add esp, 0x14
cmp dword [ebp - 0xc], 2
jne 0x4079cd
push 0x40c8b4
push edi
call esi
push eax
call fcn.00405a97
cmp eax, ebx
pop ecx
mov dword [0x40b804], eax
je 0x4079cd
push 0x40c89c
push edi
call esi
push eax
call fcn.00405a97
pop ecx
mov dword [0x40b800], eax
mov eax, dword [0x40b800]
mov ecx, dword [ebp - 8]
cmp eax, ecx
je 0x407a52
cmp dword [0x40b804], ecx
je 0x407a52
push eax
call fcn.00405b0e
push dword [0x40b804]
mov esi, eax
call fcn.00405b0e
cmp esi, ebx
pop ecx
pop ecx
mov edi, eax
je 0x407a52
cmp edi, ebx
je 0x407a52
call esi
cmp eax, ebx
je 0x407a1f
lea ecx, [ebp - 0x14]
push ecx
push 0xc
lea ecx, [ebp - 0x20]
push ecx
push 1
push eax
call edi
test eax, eax
je 0x407a1f
test byte [ebp - 0x18], 1
jne 0x407a52
lea eax, [ebp - 0x10]
push eax
call fcn.00404d04
test eax, eax
pop ecx
je 0x407a3a
push ebx
push ebx
push ebx
push ebx
push ebx
call fcn.00404291
add esp, 0x14
cmp dword [ebp - 0x10], 4
jb 0x407a49
or dword [ebp + 0x10], 0x200000
jmp 0x407a8d
or dword [ebp + 0x10], 0x40000
jmp 0x407a8d
mov eax, dword [0x40b7f8]
cmp eax, dword [ebp - 8]
je 0x407a8d
push eax
call fcn.00405b0e
cmp eax, ebx
pop ecx
je 0x407a8d
call eax
cmp eax, ebx
mov dword [ebp - 4], eax
je 0x407a8d
mov eax, dword [0x40b7fc]
cmp eax, dword [ebp - 8]
je 0x407a8d
push eax
call fcn.00405b0e
cmp eax, ebx
pop ecx
je 0x407a8d
push dword [ebp - 4]
call eax
mov dword [ebp - 4], eax
push dword [0x40b7f4]
call fcn.00405b0e
cmp eax, ebx
pop ecx
je 0x407aad
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call eax
jmp 0x407aaf
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x402ef2
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x60
push ebx
push esi
push edi
push 0x44
pop ebx
push ebx
mov esi, eax
xor edi, edi
lea eax, [ebp - 0x5c]
push edi
push eax
call fcn.00407490
push 0x10
lea eax, [ebp - 0x14]
push edi
push eax
call fcn.00407490
add esp, 0x18
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x5c]
push eax
push dword [ebp + 0xc]
or esi, 0x20
push edi
push esi
push dword [ebp + 0x10]
mov dword [ebp - 0x5c], ebx
push edi
push edi
push dword [ebp + 8]
push edi
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
mov ebx, eax
cmp ebx, edi
jne 0x402f56
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp + 0x14]
mov dword [ecx], eax
mov eax, dword [ebp + 0x18]
mov dword [eax], edi
jmp 0x402f63
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebp + 0x18]
mov dword [eax], edi
mov eax, dword [ebp - 0xc]
mov dword [ecx], eax
push dword [ebp - 0x14]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebp - 0x10]
call esi
pop edi
pop esi
mov eax, ebx
pop ebx
leave
ret

Function at 0x403437
Capabilities:
Accept command line arguments

Disassembly:
push ecx
push esi
mov esi, eax
lea eax, [esp + 4]
push eax
lea eax, [esi + 0x1004]
push eax
call dword [sym.imp.SHELL32.dll_CommandLineToArgvW]
test eax, eax
je 0x4034b3
push ebx
push edi
push dword [eax]
call fcn.00406955
push eax
lea edi, [esi + 0x2004]
push edi
mov dword [esi], eax
call fcn.004069d2
push 0x5c
push edi
call fcn.004080f3
mov ebx, eax
add esp, 0x14
test ebx, ebx
je 0x403492
lea eax, [ebx + 2]
push eax
add esi, 0x1804
push esi
call fcn.004069d2
and word [ebx], 0
pop ecx
pop ecx
jmp 0x4034ae
push dword [esi]
add esi, 0x1804
push esi
call fcn.004069d2
push 0x41b4c0
push edi
call fcn.004069d2
add esp, 0x10
xor eax, eax
pop edi
inc eax
pop ebx
pop esi
pop ecx
ret
Function at 0x40420e
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
cmp dword [esi + 0x2eda0], 0
push edi
jne 0x4042f2
cmp dword [esi + 0x4a58], 0
jne 0x4042f2
mov edi, str.afdm_
push edi
call fcn.0040691f
push eax
lea eax, [esi + 0x5cf0]
push edi
push eax
call fcn.00407748
add esp, 0x10
test eax, eax
je 0x4042f2
push ebx
xor ebx, ebx
push 0x1004
inc ebx
push ebx
call fcn.004063e5
mov edi, eax
mov dword [edi + 0x1000], ebx
mov eax, dword [esi + 0x4a90]
test eax, eax
pop ecx
pop ecx
je 0x404281
cmp dword [esi + 0x4a58], 0
jne 0x404281
push eax
jmp 0x404286
push str.command_prompt
call fcn.00406955
pop ecx
push str.Information
push edi
mov dword [ebp - 4], eax
call fcn.004069d2
cmp dword [esi + 0x4a58], 0
pop ecx
pop ecx
mov eax, str.Starting
je 0x4042af
mov eax, str.Opening
push dword [ebp - 4]
push eax
push str._s__s
lea eax, [edi + 0x800]
push 0x3ff
push eax
call fcn.00406a82
push dword [ebp - 4]
call fcn.00406b2f
add esp, 0x18
lea eax, [ebp - 8]
push eax
xor eax, eax
push eax
push edi
push 0x4041f4
push eax
push eax
mov dword [esi + 0x2ed9c], ebx
call dword [sym.imp.KERNEL32.dll_CreateThread]
pop ebx
jmp 0x4042f4
xor eax, eax
pop edi
leave
ret

Function at 0x4042f7
Capabilities:
Create udp socket
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1a8
mov eax, dword [0x41f014]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push edi
lea eax, [ebp - 0x1a8]
push eax
push 0x202
call sub.WS2_32.dll_WSAStartup
test eax, eax
je 0x404331
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.004062b8
leave
ret
push 0x11
push 2
push 2
call sub.WS2_32.dll_socket
xor esi, esi
push 0x6f
mov edi, eax
mov dword [ebp - 0x10], esi
mov word [ebp - 0x14], 2
call sub.WS2_32.dll_htons
mov word [ebp - 0x12], ax
push 0x10
lea eax, [ebp - 0x14]
push eax
push edi
call sub.WS2_32.dll_bind
test eax, eax
je 0x404373
push edi
call sub.WS2_32.dll_closesocket
call sub.WS2_32.dll_WSACleanup
mov eax, esi
jmp 0x404323
xor esi, esi
inc esi
jmp 0x404364

Function at 0x4043b6
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push edi
lea eax, [ebp - 4]
push eax
push dword [ebp + 8]
lea edi, [ebp - 0xc]
push reloc.WS2_32.dll_bind
call fcn.00404378
add esp, 0xc
test eax, eax
jne 0x404410
and dword [ebp - 8], eax
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 8]
push eax
push 0
push 0
push str.MHz
push dword [ebp - 4]
mov dword [ebp - 0xc], 4
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push dword [ebp - 4]
mov edi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test edi, edi
jne 0x404410
mov eax, dword [ebp - 8]
jmp 0x404413
or eax, 0xffffffff
pop edi
leave
ret
Function at 0x404416
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
lea ebp, [esp - 0x18c]
sub esp, 0x20c
mov eax, dword [0x41f014]
xor eax, ebp
mov dword [ebp + 0x188], eax
mov eax, dword [ebp + 0x194]
push edi
lea edx, [ebp - 0x80]
push edx
push ecx
push eax
lea edi, [ebp - 0x7c]
call fcn.00404378
add esp, 0xc
test eax, eax
jne 0x40449b
and word [ebp - 0x78], ax
push 0x1fc
push eax
lea eax, [ebp - 0x76]
push eax
call fcn.00407490
add esp, 0xc
lea eax, [ebp - 0x7c]
push eax
lea eax, [ebp - 0x78]
push eax
push 0
push 0
push ebx
push dword [ebp - 0x80]
mov dword [ebp - 0x7c], 0x1fe
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push dword [ebp - 0x80]
mov edi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test edi, edi
jne 0x40449b
lea eax, [ebp - 0x78]
push eax
call fcn.00406955
pop ecx
jmp 0x40449d
xor eax, eax
mov ecx, dword [ebp + 0x188]
xor ecx, ebp
pop edi
call fcn.004062b8
add ebp, 0x18c
leave
ret