joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40d5ac
Capabilities:
Link many functions at runtime
Print debug messages

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x41a35c]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_EncodePointer]
push esi
push edi
mov dword [ebp - 0x1c], eax
xor esi, esi
mov eax, dword [ebp + 0xc]
push esi
mov dword [ebp - 0x20], eax
call ebx
mov edi, eax
mov dword [ebp - 0x18], edi
call fcn.004050d5
mov dword [ebp - 0x14], eax
cmp dword [0x445400], esi
jne 0x40d69f
push 0x800
push esi
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov edi, eax
test edi, edi
jne 0x40d62c
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x57
jne 0x40d77f
push esi
push esi
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov edi, eax
test edi, edi
je 0x40d77f
push str.MessageBoxW
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x40d77f
push eax
call ebx
push str.GetActiveWindow
push edi
mov dword [0x445400], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
push str.GetLastActivePopup
push edi
mov dword [0x445404], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
push str.GetUserObjectInformationW
push edi
mov dword [0x445408], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
mov dword [0x445410], eax
test eax, eax
je 0x40d69c
push str.GetProcessWindowStation
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
mov dword [0x44540c], eax
mov edi, dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_IsDebuggerPresent]
test eax, eax
je 0x40d6c4
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x40d6b7
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
cmp dword [ebp - 0x14], esi
je 0x40d6d9
push 4
pop eax
jmp 0x40d781
cmp dword [ebp - 0x14], esi
je 0x40d6d9
push dword [0x445400]
call dword [sym.imp.KERNEL32.dll_DecodePointer]
push 3
jmp 0x40d6be
mov eax, dword [0x44540c]
mov ebx, dword [sym.imp.KERNEL32.dll_DecodePointer]
cmp eax, edi
je 0x40d737
cmp dword [0x445410], edi
je 0x40d737
push eax
call ebx
push dword [0x445410]
mov dword [ebp - 0x14], eax
call ebx
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 0x18], eax
test ecx, ecx
je 0x40d737
test eax, eax
je 0x40d737
call ecx
test eax, eax
je 0x40d72c
lea ecx, [ebp - 0x24]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [ebp - 0x18]
test eax, eax
je 0x40d72c
test byte [ebp - 8], 1
jne 0x40d737
mov edi, dword [ebp + 0x10]
or edi, 0x200000
jmp 0x40d767
mov eax, dword [0x445404]
cmp eax, edi
je 0x40d764
push eax
call ebx
test eax, eax
je 0x40d764
call eax
mov esi, eax
test esi, esi
je 0x40d764
mov eax, dword [0x445408]
cmp eax, edi
je 0x40d764
push eax
call ebx
test eax, eax
je 0x40d764
push esi
call eax
mov esi, eax
mov edi, dword [ebp + 0x10]
push dword [0x445400]
call ebx
test eax, eax
je 0x40d77f
push edi
push dword [ebp - 0x20]
push dword [ebp - 0x1c]
push esi
call eax
jmp 0x40d781
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040443b
mov esp, ebp
pop ebp
ret
Function at 0x432000
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
nop
nop
nop
nop
call 0x43200c
nop
nop
nop
nop
nop
pop eax
add eax, 0x40729f
nop
nop
sub eax, 0x407245
nop
mov ebx, dword [eax]
nop
nop
nop
nop
nop
nop
mov ecx, dword [eax + 4]
nop
mov edx, dword [eax + 8]
nop
nop
nop
xor dword [ebx], edx
nop
nop
nop
add ebx, 4
nop
nop
nop
nop
cmp ebx, ecx
nop
nop
nop
nop
nop
nop
jl 0x432030
nop
nop
nop
add eax, 0xc
nop
cmp dword [eax], 0
nop
nop
nop
nop
jne 0x43201e
nop
nop
nop
nop
nop
popal
nop
nop
nop
jmp 0x431219

Function at 0x403d61
Capabilities:
Encode data using xor

Disassembly:
push eax
push ebx
mov eax, 0x499
mov ecx, 0x404498
mov bl, byte [ecx]
sub bl, 0xf2
rol bl, 2
sub bl, cl
ror bl, 1
mov byte [ecx], bl
dec ecx
dec eax
jne 0x403d6d
mov eax, 0x261d
mov ecx, 0x403764
mov bl, byte [ecx]
rol bl, 7
ror bl, 2
sub bl, cl
xor bl, 0x91
mov byte [ecx], bl
dec ecx
dec eax
jne 0x403d8a
pop ebx
pop eax
add ecx, 0x2c1a
jmp ecx
Function at 0x401b70
Capabilities:
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
push esi
push edi
mov edi, ecx
cmp dword [edi], 0
je 0x401b9f
mov eax, dword [edi + 4]
test eax, eax
je 0x401b91
push eax
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov dword [edi + 4], 0
push dword [edi]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [edi], 0
push dword [ebp + 8]
push 0
push 0xf001f
call dword [sym.imp.KERNEL32.dll_OpenFileMappingW]
mov dword [edi], eax
test eax, eax
je 0x401bd5
push 0
push 0
push 0
push 0xf001f
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [edi + 4], eax
test eax, eax
pop edi
setne al
pop esi
pop ebp
ret 4
pop edi
xor al, al
pop esi
pop ebp
ret 4

Function at 0x4020a0
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
lea eax, [ebp - 4]
mov dword [ebp - 4], 0
push eax
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
push eax
call dword [sym.imp.SHELL32.dll_CommandLineToArgvW]
cmp dword [ebp - 4], 2
mov esi, eax
je 0x4020e3
push 0
push 0x41ec64
push str.This_executable_is_part_of_OpenMPT._You_do_not_need_to_run_it_by_yourself.
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
or eax, 0xffffffff
pop esi
mov esp, ebp
pop ebp
ret 0x10
push ebx
push 0x401d70
call dword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
push 2
push 0
call dword [sym.imp.ole32.dll_CoInitializeEx]
mov ebx, eax
mov ecx, esi
shr ebx, 0x1f
call fcn.00402120
xor bl, 1
pop ebx
je 0x402111
call dword [sym.imp.ole32.dll_CoUninitialize]
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret 0x10
Function at 0x406800
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x40683f
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x40683f
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x40683f
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x40683f
cmp dword [ecx + 0x74], 0xe
jbe 0x40683f
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret
Function at 0x4100d2
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
je 0x41016f
push ebx
push esi
call fcn.0041009b
xor ebx, ebx
sub eax, esi
push ebx
push ebx
push ebx
push ebx
sar eax, 1
push eax
push esi
push ebx
push ebx
mov dword [ebp - 8], eax
call fcn.0040ffe4
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x41011c
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x41016e
push edi
push eax
call fcn.0040db4d
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x41013c
call fcn.0040db13
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x41016d
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.0040ffe4
add esp, 0x20
test eax, eax
jne 0x41015b
push edi
call fcn.0040db13
jmp 0x410163
push ebx
call fcn.0040db13
mov ebx, edi
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, ebx
pop edi
pop ebx
pop esi
leave
ret

Function at 0x4103da
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x41b3f0
push 0x41b3e8
push str.FlsAlloc
push 0x1e
call fcn.004102f8
mov esi, eax
add esp, 0x10
test esi, esi
je 0x41040e
push dword [ebp + 8]
mov ecx, esi
call dword [0x4191b4]
call esi
jmp 0x410414
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x410458
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x41b400
push 0x41b3f8
push str.FlsGetValue
push 0x20
call fcn.004102f8
mov esi, eax
add esp, 0x10
test esi, esi
je 0x41048f
push dword [ebp + 8]
mov ecx, esi
call dword [0x4191b4]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]
Function at 0x4178b0
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x4178dd
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x4178dd
mov edx, 0x10b
xor eax, eax
cmp word [ecx + 0x18], dx
sete al
pop ebp
ret
xor eax, eax
pop ebp
ret
Function at 0x403888
Capabilities:
Write file on windows

Disassembly:
push ecx
cmp byte [0x40c044], 0
je 0x4038e9
cmp word [0x40c218], 0xd7b2
jne 0x4038b1
cmp dword [0x40c220], 0
jbe 0x4038b1
mov eax, 0x40c214
call dword [0x40c230]
push 0
lea eax, [esp + 4]
push eax
push 0x1e
push 0x40b060
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
push 0
lea eax, [esp + 4]
push eax
push 2
push 0x403910
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
pop edx
ret
cmp byte [0x40b024], 0
jne 0x403905
push 0
push 0x40b058
push 0x40b060
push 0
call sub.user32.dll_MessageBoxA
pop edx
ret
Function at 0x404788
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff0
push ebx
xor dl, dl
mov dword [ebp + 0x70], edx
xor edx, edx
push ebp
push 0x4047ee
push dword fs:[edx]
mov dword fs:[edx], esp
push 7
lea edx, [ebp - 0xf]
push edx
push 0x1004
push eax
call sub.kernel32.dll_GetLocaleInfoA
lea eax, [ebp - 0x10]
lea eax, [ebp - 0xb]
mov ecx, 7
call fcn.00403c60
mov eax, dword [ebp - 0x10]
or eax, 0x12e8fc55
jecxz 0x4047cc
invalid
dec dword [ebx - 0x3827c28]
add byte [edx + eax + 0x33], dh
invalid

Function at 0x40699c
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff00
push ebx
push esi
mov esi, ecx
mov ebx, dword [ebp + 8]
push pe_nt_image_headers32
lea ecx, [ebp - 0x100]
push ecx
push edx
push eax
call sub.kernel32.dll_GetLocaleInfoA_1
test eax, eax
jle 0x4069d5
mov ecx, eax
dec ecx
lea edx, [ebp - 0x100]
mov eax, ebx
call fcn.00403afc
jmp 0x4069de
mov eax, ebx
mov edx, esi
call fcn.00403a60
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4

Function at 0x4069e8
Capabilities:
Get geographical location

Disassembly:
push ebx
push esi
push edi
push ecx
mov ebx, ecx
mov esi, edx
mov edi, eax
push 2
lea eax, [esp + 4]
push eax
push esi
push edi
call sub.kernel32.dll_GetLocaleInfoA_1
test eax, eax
jle 0x406a09
mov al, byte [esp]
jmp 0x406a0b
mov eax, ebx
pop edx
pop edi
pop esi
pop ebx
ret

Function at 0x407b40
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff4
push ebx
xor edx, edx
mov dword [ebp - 0xc], edx
xor edx, edx
push ebp
push 0x407ba4
push dword fs:[edx]
mov dword fs:[edx], esp
push 7
lea edx, [ebp - 7]
push edx
push 0x1004
push eax
call sub.kernel32.dll_GetLocaleInfoA_1
lea eax, [ebp - 0xc]
lea edx, [ebp - 7]
mov ecx, 7
call fcn.00403c60
mov eax, dword [ebp - 0xc]
push eax
call sub.kernel32.dll_GetACP
mov edx, eax
pop eax
call fcn.00405b00
mov ebx, eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x407bab
lea eax, [ebp - 0xc]
call fcn.00403a0c
ret

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

Disassembly:
push ebp
mov ebp, esp
adc dword [ebx - 0x77], edx
inc ebp
cld
mov eax, dword [ebp - 4]
call 0x80403dd8
xor eax, eax
push esp
push 0x409968
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 4]
call fcn.00403de8
push eax
call sub.kernel32.dll_GetFileAttributesA
cmp eax, 0xffffffff
setne bl
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], eax
push 0x40996f
lea eax, [ebp - 4]
call fcn.00403a0c
ret
Function at 0x401e85
Capabilities:
Access the windows event log

Disassembly:
push 0x24
mov eax, 0x40f82d
call fcn.0040baa4
mov esi, edx
mov edi, ecx
push 0x4130e4
push 0
call dword [sym.imp.ADVAPI32.dll_RegisterEventSourceW]
and dword [ebp - 0x1c], 0
mov ebx, eax
xor eax, eax
mov dword [ebp - 0x18], 7
mov word [ebp - 0x2c], ax
and dword [ebp - 4], eax
lea ecx, [ebp - 0x2c]
push str.Description:_A_.NET_application_failed._n
call fcn.00403408
push 0x4130e0
push esi
push str.Application:
lea ecx, [ebp - 0x2c]
call fcn.00403408
mov ecx, eax
call fcn.00403408
mov ecx, eax
call fcn.00403408
mov esi, 0x4130e0
lea ecx, [ebp - 0x2c]
push esi
push edi
push str.Path:
call fcn.00403408
mov ecx, eax
call fcn.00403408
mov ecx, eax
call fcn.00403408
push str.Message:
lea ecx, [ebp - 0x2c]
call fcn.00403408
cmp dword [0x4184d8], 8
mov ecx, 0x4184c4
push esi
cmovae ecx, dword [0x4184c4]
push dword [0x4184d4]
push ecx
mov ecx, eax
call fcn.00403814
mov ecx, eax
call fcn.00403408
cmp dword [ebp - 0x18], 8
lea eax, [ebp - 0x2c]
cmovae eax, dword [ebp - 0x2c]
xor ecx, ecx
push ecx
mov dword [ebp - 0x30], eax
lea eax, [ebp - 0x30]
push eax
push ecx
push 1
push ecx
push 0x3ff
push ecx
push 1
push ebx
call dword [sym.imp.ADVAPI32.dll_ReportEventW]
push ebx
call dword [sym.imp.ADVAPI32.dll_DeregisterEventSource]
mov edx, dword [ebp - 0x18]
cmp edx, 8
jb 0x401fa8
mov ecx, dword [ebp - 0x2c]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x401f9f
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x401f9f
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.0040b503
pop ecx
pop ecx
call fcn.0040ba5f
ret
Function at 0x4048a8
Capabilities:
Print debug messages

Disassembly:
push 0x10
mov eax, 0x40fbb2
call fcn.0040ba70
mov eax, 0x418e5c
push eax
mov dword [ebp - 0x10], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
xor ebx, ebx
lea eax, [ebp + 0xc]
push eax
push ebx
mov dword [ebp - 4], ebx
push dword [ebp + 8]
push ebx
push ebx
call fcn.00404598
mov ecx, dword [eax]
push dword [eax + 4]
or ecx, 1
push ecx
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___stdio_common_vswprintf]
mov esi, eax
lea ecx, [ebp - 0x1c]
or eax, 0xffffffff
test esi, esi
cmovs esi, eax
add esp, 0x18
inc esi
push esi
call fcn.004049f1
lea eax, [ebp + 0xc]
mov byte [ebp - 4], 1
mov ecx, dword [ebp - 0x1c]
mov edx, esi
push eax
push dword [ebp + 8]
call fcn.004045d1
mov eax, dword fs:[0x2c]
mov edi, dword [eax]
mov esi, dword [edi + 4]
test esi, esi
jne 0x40492e
mov ecx, dword [ebp - 0x1c]
call fcn.00401e2d
jmp 0x40493c
push dword [ebp - 0x1c]
mov ecx, esi
call dword [0x4111f4]
call esi
pop ecx
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
cmp dword [0x418e78], 0
je 0x404973
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
pop ecx
cmp dword [0x418e74], eax
jne 0x404967
cmp dword [edi + 4], ebx
je 0x404973
mov edx, dword [ebp + 8]
lea eax, [ebp + 0xc]
push eax
call fcn.0040459e
lea ecx, [ebp - 0x1c]
call fcn.004049cf
push 0x418e5c
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call fcn.0040ba4a
ret
Function at 0x408b2e
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
mov esi, edx
xor edx, edx
push edi
mov edi, ecx
mov eax, esi
mov dword [esi + 0x10], edx
cmp dword [esi + 0x14], 8
jb 0x408b47
mov eax, dword [esi]
push edx
push edx
xor ecx, ecx
push edi
mov word [eax], cx
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov dword [ebp - 4], eax
test eax, eax
jne 0x408b90
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xcb
je 0x408b8c
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx ecx, ax
or ecx, 0x80070000
test eax, eax
cmovle ecx, eax
push ecx
push edi
push str.Failed_to_read_environment_variable___s___HRESULT:_0x_X
call fcn.004048a8
add esp, 0xc
xor al, al
jmp 0x408bf0
push ebx
xor ecx, ecx
push 2
pop edx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0040b7c8
pop ecx
push dword [ebp - 4]
mov ebx, eax
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
jne 0x408bde
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx ecx, ax
or ecx, 0x80070000
test eax, eax
cmovle ecx, eax
push ecx
push edi
push str.Failed_to_read_environment_variable___s___HRESULT:_0x_X
call fcn.004048a8
add esp, 0xc
xor al, al
jmp 0x408bef
push ebx
mov ecx, esi
call fcn.0040379e
push ebx
call fcn.0040b7c3
pop ecx
mov al, 1
pop ebx
pop edi
pop esi
leave
ret
Function at 0x403020
Capabilities:
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x47bd29
mov eax, dword fs:[0]
push eax
sub esp, 8
push ebx
push esi
push edi
mov eax, dword [0x49c00c]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x10], esi
lea edi, [esi + 0xc]
mov dword [esi], vtable.CAPISocket.0
mov dword [edi + 0x14], 0xf
mov dword [edi + 0x10], 0
cmp dword [edi + 0x14], 0x10
jb 0x40306e
mov eax, dword [edi]
jmp 0x403070
mov eax, edi
mov byte [eax], 0
mov dword [ebp - 4], 0
push 0x40000
mov dword [esi + 0x4002c], 0x48c9bc
mov dword [esi + 0x40030], 0x40000
call fcn.0043f015
mov dword [esi + 0x40034], eax
mov dword [esi + 0x40038], 0
mov dword [esi + 0x4003c], 0
lea ebx, [esi + 0x40044]
mov byte [ebp - 4], 1
push 8
mov dword [ebp - 0x14], ebx
mov dword [ebx], 0
mov dword [ebx + 4], 0
mov dword [ebx + 8], 0
mov dword [ebx + 0xc], 0
mov dword [ebx + 0x10], 0
call fcn.0043ed67
add esp, 8
mov dword [ebx], eax
test eax, eax
je 0x4030fe
mov dword [eax], 0
mov dword [eax + 4], 0
mov eax, dword [ebx]
mov dword [eax], ebx
mov dword [esi + 4], 0xffffffff
mov dword [esi + 8], 0
cmp dword [edi + 0x14], 0x10
mov dword [edi + 0x10], 0
jb 0x40311f
mov edi, dword [edi]
mov eax, dword [0x4a5718]
mov ecx, eax
inc eax
mov byte [edi], 0
mov dword [esi + 0x24], 0
mov dword [0x4a5718], eax
test ecx, ecx
jne 0x40314a
push 0x4abe80
push 0x101
call dword [sym.imp.WS2_32.dll_WSAStartup]
mov dword [esi + 0x40040], 0
mov eax, esi
mov dword [esi + 0x40028], 0
mov dword [esi + 0x40058], 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x403b30
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
Resolve dns
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [0x49c00c]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [0x4a5790]
push ebx
push esi
mov esi, dword [ebp + 0xc]
mov dword [ebp - 0x20], eax
push edi
mov edi, dword [0x4a57c8]
test esi, esi
je 0x403caf
mov ebx, dword [ebp + 0x10]
test ebx, ebx
je 0x403caf
cmp dword [edi + 4], 0xffffffff
je 0x403b74
mov ecx, edi
call fcn.00403310
mov al, byte [esi]
cmp al, 0x30
jl 0x403b9a
cmp al, 0x39
jg 0x403b9a
xorps xmm0, xmm0
mov eax, 2
movups xmmword [ebp - 0x18], xmm0
push esi
mov word [ebp - 0x18], ax
call dword [sym.imp.WS2_32.dll_inet_addr]
mov dword [ebp - 0x14], eax
jmp 0x403bd6
push esi
call dword [sym.imp.WS2_32.dll_gethostbyname]
mov ecx, eax
mov dword [ebp - 0x24], ecx
test ecx, ecx
je 0x403caf
xorps xmm0, xmm0
movups xmmword [ebp - 0x18], xmm0
movsx eax, word [ecx + 0xa]
push eax
mov eax, dword [ecx + 0xc]
push dword [eax]
lea eax, [ebp - 0x14]
push eax
call fcn.00443d00
mov eax, dword [ebp - 0x24]
add esp, 0xc
mov ax, word [eax + 8]
mov word [ebp - 0x18], ax
push ebx
call dword [sym.imp.WS2_32.dll_htons]
push 0
push 1
push 2
mov word [ebp - 0x16], ax
call dword [sym.imp.WS2_32.dll_socket]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x403c0d
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.0043ed51
mov esp, ebp
pop ebp
ret 0xc
push 4
lea eax, [ebp - 0x1c]
mov dword [edi + 4], ebx
push eax
push 0x1002
push 0xffff
push ebx
mov dword [ebp - 0x1c], 0x40000
call dword [sym.imp.WS2_32.dll_setsockopt]
push 0x10
lea eax, [ebp - 0x18]
push eax
push ebx
call dword [sym.imp.WS2_32.dll_connect]
test eax, eax
je 0x403c6a
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push ebx
mov esi, eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [edi + 4], 0xffffffff
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.0043ed51
mov esp, ebp
pop ebp
ret 0xc
push 0x31
push 0x401
push dword [ebp - 0x20]
push ebx
call dword [sym.imp.WS2_32.dll_WSAAsyncSelect]
mov eax, dword [ebp - 0x20]
lea ecx, [edi + 0xc]
push esi
mov dword [edi + 8], eax
call fcn.00404460
mov eax, dword [ebp + 0x10]
mov dword [edi + 0x24], eax
xor eax, eax
mov dword [edi + 0x40028], 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.0043ed51
mov esp, ebp
pop ebp
ret 0xc
mov ecx, dword [ebp - 8]
or eax, 0xffffffff
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0043ed51
mov esp, ebp
pop ebp
ret 0xc
Function at 0x403cd0
Capabilities:
Receive data
Receive data on socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [0x49c00c]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [0x4a57c8]
push edi
mov eax, dword [esi + 4]
cmp eax, 0xffffffff
je 0x403d6b
cmp dword [esi + 0x40028], 0
je 0x403d6b
lea ecx, [ebp - 8]
xor edi, edi
push ecx
push 0x4004667f
push eax
call dword [sym.imp.WS2_32.dll_ioctlsocket]
cmp dword [ebp - 8], edi
jbe 0x403d60
lea ebx, [esi + 0x28]
push 0
push 0x40000
push ebx
push dword [esi + 4]
call dword [sym.imp.WS2_32.dll_recv]
cmp eax, 0xffffffff
je 0x403d44
test eax, eax
je 0x403d3d
push eax
push ebx
lea ecx, [esi + 0x4002c]
add edi, eax
call fcn.00402590
cmp edi, dword [ebp - 8]
jb 0x403d14
jmp 0x403d60
push pe_nt_image_headers32
push str.CSocketAPISocket.cpp
push str.socket_receive_error_
push str.ERROR____s_n_s:__d_n_n
call fcn.00402340
add esp, 0x10
mov ecx, esi
call fcn.00403d80
test eax, eax
jne 0x403d60
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0043ed51
mov esp, ebp
pop ebp
ret