joyce8/EMBER2024-capa huggingface dataset:
Function at 0x41fda0
Capabilities:
Create directory
Extract resource via kernel32 functions
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x220
mov dword [ebp - 4], 0
push 0x104
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov dword [ebp - 0x210], eax
cmp dword [ebp - 0x210], 0
jne 0x41fde8
push 0xa
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov dword [ebp - 0x210], eax
cmp dword [ebp - 0x210], 0
je 0x41fef9
mov ecx, dword [ebp - 0x210]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov dword [ebp - 0x220], eax
cmp dword [ebp - 0x220], 0
je 0x41fef9
mov eax, dword [ebp - 0x220]
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov dword [ebp - 0x21c], eax
cmp dword [ebp - 0x21c], 0
je 0x41fef9
mov ecx, dword [ebp - 0x210]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
push eax
mov ecx, dword [ebp + 0x14]
push ecx
push 0x467ee4
push 0x208
lea edx, [ebp - 0x20c]
push edx
call fcn.004274e8
add esp, 0x14
push 0
mov eax, dword [ebp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
push 0
push 0x80
push 4
push 0
push 1
push 0x40000000
lea ecx, [ebp - 0x20c]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x214], eax
cmp dword [ebp - 0x214], 0xffffffff
jne 0x41feac
xor al, al
jmp 0x41fefb
push 0
lea edx, [ebp - 0x218]
push edx
mov eax, dword [ebp - 4]
sub eax, 2
push eax
mov ecx, dword [ebp - 0x21c]
push ecx
mov edx, dword [ebp - 0x214]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x41fee8
push 0x30
push str.Installation_error
push str.Cant_create_file__Disk_Full_
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
mov eax, dword [ebp - 0x214]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, 1
jmp 0x41fefb
xor al, al
mov esp, ebp
pop ebp
ret

Function at 0x41feff
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov ecx, dword [ebp + 0x10]
call fcn.004043e0
push 0xa
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x41ff7e
mov edx, dword [ebp - 8]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x41ff7e
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.KERNEL32.dll_LockResource]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
je 0x41ff7e
mov edx, dword [ebp - 8]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp - 0xc]
push ecx
mov edx, dword [ebp - 0x10]
push edx
mov ecx, dword [ebp + 0x10]
call fcn.00404330
and eax, 0xff
test eax, eax
je 0x41ff7e
mov al, 1
jmp 0x41ff80
xor al, al
mov esp, ebp
pop ebp
ret
Function at 0x4201d0
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
mov byte [ebp - 8], 0
mov eax, dword [ebp + 0x18]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x420250
mov eax, dword [ebp - 4]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x420250
mov edx, dword [ebp - 0xc]
push edx
call dword [sym.imp.KERNEL32.dll_LockResource]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
je 0x420250
mov eax, dword [ebp - 4]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov dword [ebp - 0x14], eax
cmp dword [ebp + 0x10], 0
je 0x42023e
mov edx, dword [ebp + 0x10]
mov eax, dword [ebp - 0x10]
mov dword [edx], eax
cmp dword [ebp + 0x14], 0
je 0x42024c
mov ecx, dword [ebp + 0x14]
mov edx, dword [ebp - 0x14]
mov dword [ecx], edx
mov byte [ebp - 8], 1
mov al, byte [ebp - 8]
mov esp, ebp
pop ebp
ret

Function at 0x420257
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
mov byte [ebp - 8], 0
mov eax, dword [ebp + 0x18]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x4202d7
mov eax, dword [ebp - 4]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x4202d7
mov edx, dword [ebp - 0xc]
push edx
call dword [sym.imp.KERNEL32.dll_LockResource]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
je 0x4202d7
mov eax, dword [ebp - 4]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov dword [ebp - 0x14], eax
cmp dword [ebp + 0x10], 0
je 0x4202c5
mov edx, dword [ebp + 0x10]
mov eax, dword [ebp - 0x10]
mov dword [edx], eax
cmp dword [ebp + 0x14], 0
je 0x4202d3
mov ecx, dword [ebp + 0x14]
mov edx, dword [ebp - 0x14]
mov dword [ecx], edx
mov byte [ebp - 8], 1
mov al, byte [ebp - 8]
mov esp, ebp
pop ebp
ret

Function at 0x420380
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push 0xa
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x4203ce
mov edx, dword [ebp - 8]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x4203ce
mov ecx, dword [ebp - 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_LockResource]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x4203ce
mov eax, dword [ebp - 4]
jmp 0x4203d0
xor eax, eax
mov esp, ebp
pop ebp
ret
Function at 0x4207e7
Capabilities:
Create service
Delete service
Persist via windows service
Start service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
mov byte [ebp - 4], 0
mov dword [ebp - 0x10], 0x10
mov eax, dword [ebp + 0x1c]
and eax, 0xff
test eax, eax
je 0x42080d
mov ecx, dword [ebp - 0x10]
or ch, 1
mov dword [ebp - 0x10], ecx
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x42093e
push 0
push 0
push 0x46ca74
push 0
push 0
mov edx, dword [ebp + 8]
push edx
push 1
push 2
mov eax, dword [ebp - 0x10]
push eax
push 0xf01ff
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp - 0xc]
push eax
call dword [sym.imp.ADVAPI32.dll_CreateServiceA]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x4208f8
mov ecx, dword [ebp + 0x14]
and ecx, 0xff
test ecx, ecx
je 0x4208e8
mov edx, dword [ebp + 0x10]
mov dword [ebp - 0x14], edx
lea eax, [ebp - 0x14]
push eax
push 1
mov ecx, dword [ebp - 8]
push ecx
call dword [sym.imp.ADVAPI32.dll_StartServiceA]
test eax, eax
je 0x420893
mov byte [ebp - 4], 1
jmp 0x4208d0
mov edx, dword [ebp + 0x14]
and edx, 0xff
test edx, edx
je 0x4208a9
mov dword [ebp - 0x18], 0x4680e8
jmp 0x4208b0
mov dword [ebp - 0x18], 0x4680f0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov eax, dword [ebp - 0x18]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
push edx
push str.InstallService___s_____s____s__StartService___Error__d_
call fcn.0042571d
add esp, 0x14
mov eax, dword [ebp + 0x18]
and eax, 0xff
test eax, eax
je 0x4208e6
mov ecx, dword [ebp - 8]
push ecx
call dword [sym.imp.ADVAPI32.dll_DeleteService]
jmp 0x4208ec
mov byte [ebp - 4], 1
mov edx, dword [ebp - 8]
push edx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x420934
mov eax, dword [ebp + 0x14]
and eax, 0xff
test eax, eax
je 0x42090d
mov dword [ebp - 0x1c], str.true
jmp 0x420914
mov dword [ebp - 0x1c], str.false
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov ecx, dword [ebp - 0x1c]
push ecx
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
push str.InstallService___s_____s____s__CreateService___Error__d_
call fcn.0042571d
add esp, 0x14
mov ecx, dword [ebp - 0xc]
push ecx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov al, byte [ebp - 4]
mov esp, ebp
pop ebp
ret

Function at 0x424e4a
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
mov dword [ebp - 8], 0
mov dword [ebp - 4], 0
cmp dword [ebp + 8], 0xffffffff
je 0x424ea8
mov dword [ebp - 4], 0xffffffde
push 2
push 0
mov eax, dword [ebp - 4]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x424ea8
push 0
lea edx, [ebp - 8]
push edx
push 0x20
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
push 2
push 0
push 0
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov esp, ebp
pop ebp
ret
Function at 0x424eac
Capabilities:
Check mutex on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x12c
mov byte [ebp - 4], 0
call fcn.0041e421
cmp eax, 0x29
jle 0x424ecf
mov dword [ebp - 0x12c], str.Global_
jmp 0x424ed9
mov dword [ebp - 0x12c], 0x46caa8
mov eax, dword [str.ntrexe.log]
push eax
mov ecx, dword [ebp - 0x12c]
push ecx
push str._s_s
lea edx, [ebp - 0x128]
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
lea eax, [ebp - 0x128]
push eax
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov ecx, dword [ebp + 8]
mov dword [ecx], eax
mov edx, dword [ebp + 8]
cmp dword [edx], 0
je 0x424f48
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x424f2c
mov byte [ebp - 4], 1
jmp 0x424f48
push 0xfa
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
je 0x424f48
mov byte [ebp - 4], 1
mov al, byte [ebp - 4]
mov esp, ebp
pop ebp
ret

Function at 0x42569c
Capabilities:
Delete file

Disassembly:
push ebp
mov ebp, esp
push ecx
push 0
push 0x80
push 4
push 0
push 1
push 0xc0000000
mov eax, dword [str.ntrexe.log]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0xffffffff
je 0x425716
push 2
push 0
push 0
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0x16e360
jbe 0x425716
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [str.ntrexe.log]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push 0
push 0x80
push 4
push 0
push 1
push 0xc0000000
mov ecx, dword [str.ntrexe.log]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
mov esp, ebp
pop ebp
ret
Function at 0x42571d
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
mov byte [ebp - 4], 1
mov byte [ebp - 0x30], 0
mov dword [ebp - 8], 0
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x3c], 0
mov eax, dword [ebp + 8]
movsx ecx, byte [eax]
test ecx, ecx
je 0x425818
mov dword [ebp - 0x38], 0
mov byte [ebp - 0x30], 1
lea edx, [ebp - 0x3c]
push edx
call fcn.00424eac
add esp, 4
and eax, 0xff
test eax, eax
je 0x425818
call fcn.0042569c
mov dword [ebp - 0x44], eax
push 0x21
push 0
lea eax, [ebp - 0x2c]
push eax
call fcn.00425a50
add esp, 0xc
lea ecx, [ebp - 0x2c]
push ecx
mov edx, dword [ebp - 0x44]
push edx
call fcn.00424e4a
add esp, 8
cmp dword [ebp - 0x44], 0xffffffff
je 0x42580c
lea eax, [ebp + 0xc]
mov dword [ebp - 0x34], eax
mov ecx, dword [ebp - 0x38]
push ecx
mov dl, byte [ebp - 0x30]
push edx
lea eax, [ebp - 8]
push eax
lea ecx, [ebp - 0x2c]
push ecx
mov edx, dword [ebp - 0x48]
push edx
mov eax, dword [ebp - 0x34]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.00424f6e
add esp, 0x1c
mov byte [ebp - 4], al
mov dword [ebp - 0x34], 0
mov edx, dword [ebp - 4]
and edx, 0xff
test edx, edx
je 0x425802
push 0
lea eax, [ebp - 0x40]
push eax
mov ecx, dword [ebp - 8]
push ecx
call fcn.00426bd0
add esp, 4
push eax
mov edx, dword [ebp - 8]
push edx
mov eax, dword [ebp - 0x44]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, dword [ebp - 0x44]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 0x3c]
push edx
call fcn.00424f4f
add esp, 4
lea eax, [ebp - 8]
push eax
call fcn.004234c1
add esp, 4
mov esp, ebp
pop ebp
ret

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

Disassembly:
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x43fd9a
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00429001
pop ecx
or eax, 0xffffffff
ret
test al, 1
je 0x43fdbd
test byte [esp + 8], 2
je 0x43fdbd
call fcn.00429074
mov dword [eax], 0xd
call fcn.0042907d
mov dword [eax], 5
jmp 0x43fd96
xor eax, eax
ret
Function at 0x401120
Capabilities:
Access the windows event log

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x42b6a8
mov eax, dword fs:[0]
push eax
sub esp, 0xc
push esi
push edi
mov eax, dword [0x434674]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov eax, dword [edi + 4]
push eax
push 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
call dword [sym.imp.ADVAPI32.dll_RegisterEventSourceW]
mov esi, eax
test esi, esi
je 0x401196
mov ecx, dword [edi + 4]
push 0
lea edx, [ebp - 0x18]
push edx
push 0
push 2
push 0
push 0
push 0
push 4
push esi
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x14], str.WindowsService_in_OnStart
call dword [sym.imp.ADVAPI32.dll_ReportEventW]
push esi
call dword [sym.imp.ADVAPI32.dll_DeregisterEventSource]
push 8
call fcn.004122cd
add esp, 4
test eax, eax
je 0x4011af
mov dword [eax], 0x401210
mov dword [eax + 4], edi
jmp 0x4011b1
xor eax, eax
mov dword [ebp - 0x14], eax
push 0x10
push eax
push 0x4019c0
mov dword [ebp - 4], 0
call dword [sym.imp.KERNEL32.dll_QueueUserWorkItem]
test eax, eax
je 0x4011ea
push 0
call fcn.00412271
add esp, 4
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret 8
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x10], eax
push 0x431b3c
lea eax, [ebp - 0x10]
push eax
call fcn.00414cdf
int3

Function at 0x401380
Capabilities:
Access the windows event log

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push ebx
push esi
mov esi, ecx
mov eax, dword [esi + 4]
push edi
xor ebx, ebx
push eax
push ebx
mov dword [ebp - 8], ebx
mov dword [ebp - 4], ebx
call dword [sym.imp.ADVAPI32.dll_RegisterEventSourceW]
mov edi, eax
cmp edi, ebx
je 0x4013cc
mov ecx, dword [esi + 4]
push ebx
lea edx, [ebp - 8]
push edx
push ebx
push 2
push ebx
push ebx
push ebx
push 4
push edi
mov dword [ebp - 8], ecx
mov dword [ebp - 4], str.WindowsService_in_OnStop
call dword [sym.imp.ADVAPI32.dll_ReportEventW]
push edi
call dword [sym.imp.ADVAPI32.dll_DeregisterEventSource]
mov eax, dword [esi + 0x30]
mov ecx, 1
mov dword [esi + 0x28], ecx
mov dword [ebp - 4], eax
cmp eax, ebx
je 0x4013fd
mov ebx, str.Stop
mov edi, str.Socket_Service
mov byte [eax + 1], cl
call fcn.004101d0
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x3c]
push ecx
call dword [sym.imp.WS2_32.dll_closesocket]
mov edx, dword [esi + 0x2c]
push 0xffffffffffffffff
push edx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
pop edi
pop esi
pop ebx
test eax, eax
je 0x401427
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 4], eax
push 0x431b3c
lea eax, [ebp - 4]
push eax
call fcn.00414cdf
mov esp, ebp
pop ebp
ret
Function at 0x404400
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x42b5eb
mov eax, dword fs:[0]
push eax
sub esp, 0x82c
mov eax, dword [0x434674]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov ebx, str.RecvfromSocketThread_start
mov edi, str.SocketService
mov dword [ebp - 0x830], esi
call fcn.004101d0
movzx ecx, word [esi + 0x20]
mov eax, 2
push ecx
mov dword [ebp - 0x834], 0x10
mov word [esi + 0x40], ax
call dword [sym.imp.WS2_32.dll_htons]
push str.127.0.0.1
mov word [esi + 0x42], ax
call dword [sym.imp.WS2_32.dll_inet_addr]
cmp byte [esi + 1], 0
mov dword [esi + 0x44], eax
jne 0x4045f2
nop
mov ecx, dword [esi + 0x3c]
lea edx, [ebp - 0x834]
push edx
lea eax, [esi + 0x40]
push eax
push 0
push 0x800
lea eax, [ebp - 0x810]
push eax
push ecx
call dword [sym.imp.WS2_32.dll_recvfrom]
test eax, eax
jle 0x4045e8
push 0
push 0
push 0xffffffffffffffff
lea edx, [ebp - 0x810]
push edx
push 0
push 0xfde9
mov byte [ebp + eax - 0x810], 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov edi, eax
lea ebx, [edi + edi + 2]
push ebx
call fcn.004138d7
add esp, 4
push ebx
xor ebx, ebx
mov esi, eax
push ebx
push esi
call fcn.0041d8a0
add esp, 0xc
push edi
push esi
push 0xffffffffffffffff
lea eax, [ebp - 0x810]
push eax
push ebx
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
push ebx
push 0x42fa3d
lea ecx, [ebp - 0x82c]
mov dword [ebp - 0x818], 0xf
mov dword [ebp - 0x81c], ebx
mov byte [ebp - 0x82c], bl
call fcn.004014a0
push ebx
push ebx
push ebx
push ebx
push 0xffffffffffffffff
push esi
push ebx
push 1
mov dword [ebp - 4], ebx
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov ebx, eax
push ebx
call fcn.004109a4
add esp, 4
push 0
push 0
push ebx
mov edi, eax
push edi
push 0xffffffffffffffff
push esi
push 0
push 1
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov eax, edi
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x404561
sub eax, ecx
push eax
push edi
lea ecx, [ebp - 0x82c]
call fcn.004014a0
push edi
call fcn.0041355a
mov ebx, dword [ebp - 0x82c]
add esp, 4
cmp dword [ebp - 0x818], 0x10
jae 0x404595
lea ebx, [ebp - 0x82c]
mov edi, str.socket_recv:
call fcn.004101d0
push 8
call fcn.004122cd
add esp, 4
test eax, eax
je 0x4045ba
mov ecx, dword [ebp - 0x830]
mov dword [eax + 4], ecx
mov dword [eax], esi
jmp 0x4045bc
xor eax, eax
mov ecx, eax
call fcn.004046e0
mov dword [ebp - 4], 0xffffffff
cmp dword [ebp - 0x818], 0x10
jb 0x4045e2
mov edx, dword [ebp - 0x82c]
push edx
call fcn.00412271
add esp, 4
mov esi, dword [ebp - 0x830]
cmp byte [esi + 1], 0
je 0x404480
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00411d6c
mov esp, ebp
pop ebp
ret
Function at 0x404610
Capabilities:
Create tcp socket
Create udp socket
Get local ipv4 addresses
Get socket information
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
mov eax, dword [0x434674]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push 6
mov ebx, 1
push ebx
push 2
mov dword [ebp - 0x2c], ebx
call dword [sym.imp.WS2_32.dll_socket]
push 4
mov esi, eax
lea eax, [ebp - 0x2c]
push eax
push 4
push 0xffff
push esi
call dword [sym.imp.WS2_32.dll_setsockopt]
mov ecx, 2
push 0
mov word [ebp - 0x14], cx
call dword [sym.imp.WS2_32.dll_htonl]
mov dword [ebp - 0x10], eax
push 0x10
lea eax, [ebp - 0x14]
push eax
xor edx, edx
push esi
mov word [ebp - 0x12], dx
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
je 0x40467a
xor bl, bl
jmp 0x4046a5
lea ecx, [ebp - 0x28]
push ecx
lea edx, [ebp - 0x24]
push edx
push esi
mov dword [ebp - 0x28], 0x10
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x404698
xor bl, bl
jmp 0x4046a5
mov eax, dword [ebp - 0x22]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
mov word [edi], ax
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
test eax, eax
je 0x4046c2
xor al, al
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00411d6c
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
pop esi
mov al, bl
xor ecx, ebp
pop ebx
call fcn.00411d6c
mov esp, ebp
pop ebp
ret
Function at 0x4087b0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x42ae48
mov eax, dword fs:[0]
push eax
sub esp, 0x24
mov eax, dword [0x434674]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
cmp dword [ebx + 0x44], 0
je 0x40895e
cmp byte [ebx + 0x49], 0
je 0x40895e
mov eax, dword [ebx]
mov edx, dword [eax + 0xc]
push 0xffffffffffffffff
mov ecx, ebx
call edx
cmp eax, 0xffffffff
je 0x408952
mov ecx, 0xf
xor eax, eax
mov byte [ebp - 0x2c], 0
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x1c], 8
cmp ecx, 0x10
jae 0x408825
lea eax, [ebp - 0x2c]
mov byte [eax + 8], 0
mov dword [ebp - 4], 0
mov edi, dword [ebp - 0x18]
mov eax, dword [ebp - 0x2c]
mov edx, eax
cmp edi, 0x10
jae 0x408842
lea edx, [ebp - 0x2c]
mov eax, edx
add edx, dword [ebp - 0x1c]
mov ecx, dword [ebx + 0x44]
mov esi, dword [ecx]
lea edi, [ebp - 0x30]
push edi
push edx
push eax
lea eax, [ebx + 0x4c]
push eax
mov eax, dword [esi + 0x18]
call eax
sub eax, 0
je 0x408879
dec eax
je 0x40887d
sub eax, 2
lea ecx, [ebp - 0x2c]
je 0x408959
call fcn.00401470
xor al, al
jmp 0x408960
mov byte [ebx + 0x49], 0
mov edi, dword [ebp - 0x18]
mov eax, dword [ebp - 0x2c]
mov edx, eax
cmp edi, 0x10
jae 0x40888d
lea edx, [ebp - 0x2c]
mov esi, dword [ebp - 0x30]
sub esi, edx
je 0x4088ba
cmp edi, 0x10
jae 0x40889c
lea eax, [ebp - 0x2c]
mov ecx, dword [ebx + 0x54]
push ecx
push esi
push 1
push eax
call fcn.00413731
add esp, 0x10
cmp esi, eax
jne 0x40894a
mov edi, dword [ebp - 0x18]
mov eax, dword [ebp - 0x2c]
cmp byte [ebx + 0x49], 0
je 0x408956
test esi, esi
jne 0x408836
mov ecx, dword [ebp - 0x1c]
or edx, 0xffffffff
sub edx, ecx
cmp edx, 8
jbe 0x40897b
lea esi, [ecx + 8]
cmp esi, 0xfffffffe
ja 0x40897b
cmp edi, esi
jae 0x408933
push ecx
push esi
lea ecx, [ebp - 0x2c]
call fcn.004017d0
mov edi, dword [ebp - 0x18]
mov eax, dword [ebp - 0x2c]
test esi, esi
je 0x408836
mov ecx, eax
cmp edi, 0x10
jae 0x40890f
lea ecx, [ebp - 0x2c]
mov edx, dword [ebp - 0x1c]
xor eax, eax
mov dword [ecx + edx], eax
mov dword [ecx + edx + 4], eax
cmp dword [ebp - 0x18], 0x10
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x1c], esi
jae 0x40892a
lea eax, [ebp - 0x2c]
mov byte [eax + esi], 0
jmp 0x408830
test esi, esi
jne 0x408905
mov dword [ebp - 0x1c], esi
cmp edi, 0x10
jae 0x408942
lea eax, [ebp - 0x2c]
mov byte [eax], 0
jmp 0x408830
lea ecx, [ebp - 0x2c]
call fcn.00401470
xor al, al
jmp 0x408960
lea ecx, [ebp - 0x2c]
call fcn.00401470
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00411d6c
mov esp, ebp
pop ebp
ret
push str.string_too_long
call fcn.004108e9
int3