joyce8/EMBER2024-capa huggingface dataset:
Function at 0x41e60d
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x208
push ebx
push esi
mov esi, ecx
push edi
lea edi, [esi + 0x24]
mov eax, dword [esi]
mov ecx, dword [edi]
xor ebx, ebx
xor edx, edx
inc ebx
mov dword [ebp - 0x104], edx
mov dword [ebp - 0x204], eax
mov dword [ebp - 0x208], ebx
cmp dword [ebp + edx*4 - 0x204], ecx
je 0x41e647
inc edx
cmp edx, ebx
jb 0x41e639
cmp edx, ebx
jne 0x41e65b
mov dword [ebp - 0x200], ecx
mov dword [ebp - 0x208], 2
mov edx, dword [esi + 0x10]
sub edx, dword [esi + 0x14]
je 0x41e673
mov dword [ebp - 0x100], eax
mov dword [ebp - 0x104], 1
mov eax, dword [esi + 0x34]
sub eax, dword [esi + 0x38]
je 0x41e6ab
mov edx, dword [ebp - 0x104]
xor eax, eax
test edx, edx
jbe 0x41e695
cmp dword [ebp + eax*4 - 0x100], ecx
je 0x41e695
inc eax
cmp eax, edx
jb 0x41e687
cmp eax, edx
jne 0x41e6ab
cmp edx, 0x40
jae 0x41e6ab
mov dword [ebp + eax*4 - 0x100], ecx
inc dword [ebp - 0x104]
xor ebx, ebx
lea eax, [ebp - 0x104]
push ebx
push ebx
push eax
lea eax, [ebp - 0x208]
push eax
push ebx
call dword [sym.imp.WS2_32.dll_select]
cmp eax, ebx
jle 0x41e72f
cmp eax, 4
jg 0x41e72f
lea eax, [ebp - 0x208]
push eax
push dword [esi]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x41e6f0
lea eax, [esi + 0x28]
push eax
push dword [esi]
call fcn.0041e74e
pop ecx
test al, al
pop ecx
je 0x41e749
lea eax, [ebp - 0x208]
push eax
push dword [edi]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x41e713
lea eax, [esi + 4]
push eax
push dword [edi]
call fcn.0041e74e
pop ecx
test al, al
pop ecx
je 0x41e749
mov ecx, edi
call fcn.0041e592
test al, al
je 0x41e749
mov ecx, esi
call fcn.0041e592
test al, al
jne 0x41e61e
jmp 0x41e749
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.ReTranslate__1_error_d__d
push 0x4ae550
call fcn.00428736
add esp, 0x10
pop edi
pop esi
pop ebx
leave
ret

Function at 0x41e74e
Capabilities:
Receive data
Receive data on socket

Disassembly:
push esi
mov esi, dword [esp + 0xc]
push edi
mov edi, 0x4000
mov ecx, dword [esi + 0xc]
mov eax, dword [esi]
add ecx, edi
push ecx
mov ecx, esi
call dword [eax + 4]
mov eax, dword [esi]
push 0
push edi
mov ecx, esi
call dword [eax + 0x18]
push eax
push dword [esp + 0x18]
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jle 0x41e78d
push eax
push 0
mov ecx, esi
call fcn.00428fab
mov al, 1
jmp 0x41e7bf
jge 0x41e7bd
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
je 0x41e789
cmp eax, 0x2746
je 0x41e7bd
cmp eax, 0x2745
je 0x41e7bd
push eax
push str.ReTranslator::SimpleRead__1_error_d
push 0x4ae550
call fcn.00428736
add esp, 0xc
xor al, al
pop edi
pop esi
ret

Function at 0x41eb46
Capabilities:
Identify system language via api

Disassembly:
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetUserDefaultUILanguage]
mov edx, 0x3ff
mov ecx, 0x4a23fc
and eax, edx
xor esi, esi
mov di, word [ecx]
and di, dx
cmp ax, di
je 0x41eb7c
add ecx, 0x18
inc esi
cmp ecx, 0x4a25ac
jl 0x41eb5c
mov ax, word [0x4a23fc]
pop edi
pop esi
ret
lea eax, [esi + esi*2]
mov ax, word [eax*8 + 0x4a23fc]
jmp 0x41eb79
Function at 0x420087
Capabilities:
Query service status

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [ebp + 8]
push ebx
xor ebx, ebx
push esi
mov esi, dword [ebp + 0x14]
mov byte [eax], bl
mov eax, dword [ebp + 0xc]
push edi
push 0xf003f
push ebx
mov byte [eax], bl
mov eax, dword [ebp + 0x10]
push ebx
mov edi, ecx
mov byte [eax], bl
mov byte [esi], bl
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
cmp eax, ebx
mov dword [ebp + 0x14], eax
je 0x420119
push 0xf01ff
lea ecx, [edi + 4]
call fcn.0042c635
push eax
push dword [ebp + 0x14]
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov edi, eax
cmp edi, ebx
mov ebx, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
je 0x42010e
lea eax, [ebp - 0x1c]
mov byte [esi], 1
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x420109
cmp dword [ebp - 0x18], 4
jne 0x4200fd
mov eax, dword [ebp + 0x10]
mov byte [eax], 1
cmp dword [ebp - 0x18], 1
jne 0x420109
mov eax, dword [ebp + 0xc]
mov byte [eax], 1
push edi
call ebx
jmp 0x420114
mov eax, dword [ebp + 8]
mov byte [eax], 1
push dword [ebp + 0x14]
call ebx
pop edi
pop esi
pop ebx
leave
ret 0x10
Function at 0x420120
Capabilities:
Create service
Persist via windows service

Disassembly:
mov eax, 0x47f8f8
call fcn.0047bf20
sub esp, 0x1c
push ebx
xor ebx, ebx
push esi
lea eax, [ebp - 0x20]
push ebx
push eax
mov esi, ecx
call fcn.0040bb00
lea eax, [ebp - 0x20]
mov dword [ebp - 4], ebx
push eax
lea eax, [ebp - 0x24]
push 0x4a2db4
push eax
call fcn.0042c20b
push str.___service
push eax
lea eax, [ebp - 0x10]
mov byte [ebp - 4], 1
push eax
call fcn.0042c1a0
add esp, 0x20
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 3
call fcn.0042bebc
mov ecx, esi
call fcn.0042c635
push eax
lea ecx, [ebp - 0x14]
call fcn.0042bf7c
lea eax, [ebp - 0x14]
lea ecx, [ebp - 0x10]
push eax
mov byte [ebp - 4], 4
call fcn.0042c39d
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 3
call fcn.0042bebc
lea ecx, [esi + 4]
call fcn.0042c635
push eax
lea ecx, [ebp - 0x1c]
call fcn.0042bf7c
lea ecx, [esi + 8]
mov byte [ebp - 4], 5
call fcn.0042c635
push eax
lea ecx, [ebp - 0x18]
call fcn.0042bf7c
push ebx
push ebx
push ebx
push ebx
push ebx
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 6
call fcn.0042c635
push eax
push 1
push 2
push 0x10
push 0xf01ff
lea ecx, [ebp - 0x18]
call fcn.0042c635
push eax
lea ecx, [ebp - 0x1c]
call fcn.0042c635
push eax
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_CreateServiceW]
cmp eax, ebx
jne 0x42024d
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x431
jne 0x42022d
lea eax, [ebp - 0x28]
push str.The_Ammyy_service_is_already_registered
push eax
call fcn.0042778f
pop ecx
lea eax, [ebp - 0x28]
pop ecx
push 0x48e404
push eax
call sub.MSVCRT.dll__CxxThrowException
push eax
lea eax, [ebp - 0x28]
push str.ERROR__d_CreateServiceW___while_registering_the_Ammyy_service
push eax
call fcn.0042778f
add esp, 0xc
lea eax, [ebp - 0x28]
push 0x48e404
push eax
call sub.MSVCRT.dll__CxxThrowException
push eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push 1
mov ecx, esi
call fcn.0042029c
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 5
call fcn.0042bebc
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 3
call fcn.0042bebc
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], bl
call fcn.0042bebc
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x20]
call fcn.0042bebc
mov ecx, dword [ebp - 0xc]
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 4
Function at 0x42029c
Capabilities:
Manipulate safe mode programs

Disassembly:
mov eax, 0x47f91c
call fcn.0047bf20
push ecx
push ecx
add ecx, 4
lea eax, [ebp - 0x10]
push ecx
push str.SYSTEMCurrentControlSetControlSafeBootNetwork_
push eax
call fcn.0042ac45
add esp, 0xc
and dword [ebp - 4], 0
cmp byte [ebp + 8], 0
je 0x42031f
lea ecx, [ebp + 8]
call fcn.0042989f
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 1
call fcn.0042c635
push eax
push reloc.WS2_32.dll_bind
lea ecx, [ebp + 8]
call fcn.004287ce
push 0x4a2db8
lea ecx, [ebp - 0x14]
call fcn.0042a977
push eax
push 0
lea ecx, [ebp + 8]
mov byte [ebp - 4], 2
call fcn.00428a42
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 1
call fcn.0042a904
and byte [ebp - 4], 0
lea ecx, [ebp + 8]
call fcn.0042876c
jmp 0x420334
lea ecx, [ebp - 0x10]
call fcn.0042c635
push eax
push reloc.WS2_32.dll_bind
call fcn.00428a94
pop ecx
pop ecx
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x10]
call fcn.0042a904
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
leave
ret 4
Function at 0x42034e
Capabilities:
Delete service
Query service status
Stop service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
push ebx
mov ebx, ecx
push esi
push edi
push 0xf01ff
lea ecx, [ebx + 4]
call fcn.0042c635
push eax
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov edi, eax
test edi, edi
je 0x4204c2
mov esi, dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
lea eax, [ebp - 0x24]
push eax
push edi
call esi
test eax, eax
jne 0x4203ba
call dword [sym.imp.KERNEL32.dll_GetLastError]
push edi
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push esi
lea eax, [ebp - 8]
push str.ERROR__d_QueryServiceStatus__
push eax
call fcn.0042778f
add esp, 0xc
lea eax, [ebp - 8]
push 0x48e404
push eax
call sub.MSVCRT.dll__CxxThrowException
cmp dword [ebp - 0x20], 1
je 0x420448
lea eax, [ebp - 0x24]
push eax
push 1
push edi
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
jne 0x420412
call dword [sym.imp.KERNEL32.dll_GetLastError]
push edi
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push esi
lea eax, [ebp - 8]
push str.ERROR__d_ControlService__
push eax
call fcn.0042778f
add esp, 0xc
lea eax, [ebp - 8]
push 0x48e404
push eax
call sub.MSVCRT.dll__CxxThrowException
cmp dword [ebp - 0x20], 3
jne 0x42041d
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [ebp - 0x24]
push eax
push edi
call esi
test eax, eax
jne 0x420404
cmp dword [ebp - 0x20], 1
je 0x420448
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
lea eax, [ebp - 8]
push str.The_Ammyy_service_could_not_be_stopped
push eax
call fcn.0042778f
pop ecx
lea eax, [ebp - 8]
pop ecx
push 0x48e404
push eax
call sub.MSVCRT.dll__CxxThrowException
cmp dword [ebp + 0xc], 0
je 0x4204b4
push edi
call dword [sym.imp.ADVAPI32.dll_DeleteService]
test eax, eax
jne 0x4204ab
call dword [sym.imp.KERNEL32.dll_GetLastError]
push edi
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
cmp esi, 0x430
lea eax, [ebp - 8]
jne 0x42048e
push str.The_Ammyy_service_is_already_marked_for_removing
push eax
call fcn.0042778f
pop ecx
lea eax, [ebp - 8]
pop ecx
push 0x48e404
push eax
call sub.MSVCRT.dll__CxxThrowException
push esi
push str.The_Ammyy_service_could_not_be_removed__error_d
push eax
call fcn.0042778f
add esp, 0xc
lea eax, [ebp - 8]
push 0x48e404
push eax
call sub.MSVCRT.dll__CxxThrowException
push 0
mov ecx, ebx
call fcn.0042029c
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop edi
pop esi
pop ebx
leave
ret 8
lea eax, [ebp - 8]
push str.The_Ammyy_service_could_not_be_found
push eax
call fcn.0042778f
pop ecx
lea eax, [ebp - 8]
pop ecx
push 0x48e404
push eax
call sub.MSVCRT.dll__CxxThrowException
Function at 0x4204e0
Capabilities:
Start service

Disassembly:
mov eax, 0x47f930
call fcn.0047bf20
sub esp, 0x10
push esi
push 0xf01ff
add ecx, 4
call fcn.0042c635
push eax
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov esi, eax
test esi, esi
jne 0x420529
lea eax, [ebp - 0x14]
push str.The_Ammyy_service_could_not_be_found
push eax
call fcn.0042778f
pop ecx
lea eax, [ebp - 0x14]
pop ecx
push 0x48e404
push eax
call sub.MSVCRT.dll__CxxThrowException
push 0
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_StartServiceA]
test eax, eax
jne 0x42057a
push edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
push esi
mov edi, eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
lea eax, [ebp + 8]
push edi
push eax
call fcn.0040bdb2
push dword [ebp + 8]
and dword [ebp - 4], 0
lea eax, [ebp - 0x1c]
push edi
push str.ERROR__d___S__while_starting_the_AMMYY_service
push eax
call fcn.0042778f
add esp, 0x18
lea eax, [ebp - 0x1c]
push 0x48e404
push eax
call sub.MSVCRT.dll__CxxThrowException
pop edi
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov ecx, dword [ebp - 0xc]
pop esi
mov dword fs:[0], ecx
leave
ret 4
Function at 0x42089f
Capabilities:
Delete service
Query service status
Start service

Disassembly:
mov eax, 0x47f9b8
call fcn.0047bf20
sub esp, 0x8c
push ebx
push esi
xor esi, esi
push edi
cmp dword [ebp + 8], esi
mov ebx, ecx
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x14], ebx
jge 0x4208df
lea eax, [ebp - 0x54]
push str.JustLunch___Invalid_Session
push eax
call fcn.0042778f
pop ecx
lea eax, [ebp - 0x54]
pop ecx
push 0x48e404
push eax
call sub.MSVCRT.dll__CxxThrowException
push 0xf003f
push esi
push esi
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
cmp eax, esi
mov dword [ebp - 0x18], eax
jne 0x420919
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x30]
push str.OpenSCManager___error__d
push eax
call fcn.0042778f
add esp, 0xc
lea eax, [ebp - 0x30]
push 0x48e404
push eax
call sub.MSVCRT.dll__CxxThrowException
push 1
push eax
mov ecx, ebx
mov dword [ebp - 4], esi
call fcn.0042034e
jmp 0x420933
push 2
mov ecx, ebx
pop edi
mov dword [ebp - 0x14], esi
push dword [ebp - 0x18]
mov dword [ebp - 4], edi
call fcn.00420120
lea ecx, [ebx + 4]
call fcn.0042c635
push 0xf01ff
push eax
push dword [ebp - 0x18]
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov esi, eax
test esi, esi
mov dword [ebp - 0x14], esi
jne 0x42098c
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x5c]
push str.OpenService___error__d
push eax
call fcn.0042778f
add esp, 0xc
lea eax, [ebp - 0x5c]
push 0x48e404
push eax
call sub.MSVCRT.dll__CxxThrowException
push dword [ebp + 8]
lea eax, [ebp - 0x98]
push 0x4a2f88
push eax
call dword [sym.imp.MSVCRT.dll_swprintf]
lea eax, [ebp - 0x98]
add esp, 0xc
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x20]
push eax
push edi
push esi
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
test eax, eax
jne 0x4209e9
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x38]
push str.StartService___error__d
push eax
call fcn.0042778f
add esp, 0xc
lea eax, [ebp - 0x38]
push 0x48e404
push eax
call sub.MSVCRT.dll__CxxThrowException
lea eax, [ebp - 0x78]
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
jne 0x420a1e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x40]
push str.QueryServiceStatus___error__d
push eax
call fcn.0042778f
add esp, 0xc
lea eax, [ebp - 0x40]
push 0x48e404
push eax
call sub.MSVCRT.dll__CxxThrowException
cmp dword [ebp - 0x74], 1
je 0x420a2e
push 0xa
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x4209e9
push esi
call dword [sym.imp.ADVAPI32.dll_DeleteService]
test eax, eax
jne 0x420a5f
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x4c]
push str.DeleteService___error__d
push eax
call fcn.0042778f
add esp, 0xc
lea eax, [ebp - 0x4c]
push 0x48e404
push eax
call sub.MSVCRT.dll__CxxThrowException
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
push dword [ebp - 0x18]
call esi
push 0
mov ecx, ebx
call fcn.0042029c
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret 8
Function at 0x42307c
Capabilities:
Create process on windows

Disassembly:
mov eax, 0x47fe54
call fcn.0047bf20
push ecx
lea eax, [ebp - 0x10]
push eax
call fcn.0042a0c2
and dword [ebp - 4], 0
push 1
push 0
push 0
lea ecx, [ebp - 0x10]
call fcn.0042c635
push eax
push 0x4a1230
push 0
call dword [sym.imp.SHELL32.dll_ShellExecuteA]
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x10]
call fcn.0042a904
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
leave
ret

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

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push esi
mov esi, ecx
cmp dword [esi], 0xffffffff
je 0x4232a5
lea eax, [ebp - 8]
push str.CreateInternal__1
push eax
call fcn.0042778f
pop ecx
lea eax, [ebp - 8]
pop ecx
push 0x48e404
push eax
call sub.MSVCRT.dll__CxxThrowException
push 0
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
cmp eax, 0xffffffff
mov dword [esi], eax
jne 0x4232de
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 8]
push str.Error__d_socket__
push eax
call fcn.0042778f
add esp, 0xc
lea eax, [ebp - 8]
push 0x48e404
push eax
call sub.MSVCRT.dll__CxxThrowException
pop esi
leave
ret

Function at 0x4233f6
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x114
mov eax, dword [ebp + 8]
push esi
mov esi, ecx
xor edx, edx
mov ecx, 0x3e8
push edi
div ecx
xor edi, edi
mov dword [ebp - 0x114], 1
mov dword [ebp - 0x10], eax
mov eax, dword [esi]
imul edx, edx, 0x3e8
mov dword [ebp - 0x110], eax
lea eax, [ebp - 0x10]
push eax
push edi
lea eax, [ebp - 0x114]
push edi
push eax
push edi
mov dword [ebp - 0xc], edx
call dword [sym.imp.WS2_32.dll_select]
cmp eax, edi
jne 0x423450
or eax, 0xffffffff
pop edi
pop esi
leave
ret 4
jle 0x423499
lea eax, [ebp - 0x114]
push eax
push dword [esi]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x423499
push edi
push edi
push dword [esi]
call dword [sym.imp.WS2_32.dll_accept]
cmp eax, 0xffffffff
jne 0x42344a
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 8]
push str.accept___error_d
push eax
call fcn.0042778f
add esp, 0xc
lea eax, [ebp - 8]
push 0x48e404
push eax
call sub.MSVCRT.dll__CxxThrowException
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 8]
push str.select___error_d
push eax
call fcn.0042778f
add esp, 0xc
lea eax, [ebp - 8]
push 0x48e404
push eax
call sub.MSVCRT.dll__CxxThrowException

Function at 0x4234bf
Capabilities:
Connect socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov eax, dword [ebp + 8]
push esi
push dword [ebp + 0xc]
mov esi, ecx
mov dword [ebp - 0xc], eax
mov word [ebp - 0x10], 2
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0xe], ax
lea eax, [ebp - 0x10]
push 0x10
push eax
push dword [esi]
call dword [sym.imp.WS2_32.dll_connect]
test eax, eax
pop esi
je 0x4234fa
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
leave
ret 8
Function at 0x423551
Capabilities:
Connect socket
Get socket status

Disassembly:
mov eax, 0x47ff08
call fcn.0047bf20
sub esp, 0x22c
push ebx
push esi
push edi
lea ecx, [ebp - 0x10]
call fcn.0042326f
xor ebx, ebx
lea ecx, [ebp - 0x10]
mov dword [ebp - 4], ebx
call fcn.0042327a
push ebx
push dword [ebp - 0x10]
call fcn.0042423c
mov eax, dword [ebp + 8]
pop ecx
pop ecx
mov dword [ebp - 0x2c], eax
push dword [ebp + 0xc]
mov word [ebp - 0x30], 2
call dword [sym.imp.WS2_32.dll_htons]
mov edi, dword [ebp - 0x10]
mov word [ebp - 0x2e], ax
lea eax, [ebp - 0x30]
push 0x10
push eax
push edi
call dword [sym.imp.WS2_32.dll_connect]
xor esi, esi
inc esi
test eax, eax
je 0x423672
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
jne 0x423687
mov eax, dword [ebp + 0x10]
mov ecx, 0x3e8
cdq
idiv ecx
mov dword [ebp - 0x234], edi
mov dword [ebp - 0x238], esi
mov dword [ebp - 0x130], edi
mov dword [ebp - 0x134], esi
mov dword [ebp - 0x20], eax
imul edx, edx, 0x3e8
lea eax, [ebp - 0x20]
mov dword [ebp - 0x1c], edx
push eax
lea eax, [ebp - 0x134]
push eax
lea eax, [ebp - 0x238]
push eax
push ebx
push ebx
call dword [sym.imp.WS2_32.dll_select]
cmp eax, ebx
jl 0x4236ae
cmp eax, esi
jg 0x4236ae
cmp eax, ebx
je 0x4236a4
cmp eax, esi
jne 0x42363b
lea eax, [ebp - 0x134]
push eax
push edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
jne 0x4236a4
lea eax, [ebp - 0x238]
push eax
push edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
jne 0x423672
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x18]
push str.select___error_d
push eax
call fcn.0042778f
add esp, 0xc
lea eax, [ebp - 0x18]
push 0x48e404
push eax
call sub.MSVCRT.dll__CxxThrowException
push esi
push dword [ebp - 0x10]
call fcn.0042423c
pop ecx
pop ecx
lea ecx, [ebp - 0x10]
call fcn.0042334f
mov ebx, eax
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x10]
call fcn.00423275
mov ecx, dword [ebp - 0xc]
pop edi
mov eax, ebx
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret
lea ecx, [ebp - 0x10]
call fcn.004232e1
jmp 0x423687
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x18]
push str.select___error_d
push eax
call fcn.0042778f
add esp, 0xc
lea eax, [ebp - 0x18]
push 0x48e404
push eax
call sub.MSVCRT.dll__CxxThrowException

Function at 0x4236d4
Capabilities:
Set socket configuration

Disassembly:
push dword [esp + 4]
call fcn.004236e3
pop ecx
jmp fcn.0042372d

Function at 0x4236e3
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
xor eax, eax
lea ecx, [ebp - 4]
inc eax
push 4
push ecx
push eax
push 6
mov dword [ebp - 4], eax
push dword [ebp + 8]
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
je 0x42372b
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
lea eax, [ebp - 0xc]
push str.ERROR__d_disabling_Nagles_algorithm
push eax
call fcn.0042778f
add esp, 0xc
lea eax, [ebp - 0xc]
push 0x48e404
push eax
call sub.MSVCRT.dll__CxxThrowException
leave
ret
Function at 0x423915
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x22c
cmp dword [0x4ae794], 0
mov dword [ebp - 0x18], str.getaddrinfo
mov dword [ebp - 0x14], 0x423aae
mov dword [ebp - 0x10], str.getnameinfo
mov dword [ebp - 0xc], 0x423fdf
mov dword [ebp - 8], str.freeaddrinfo
mov dword [ebp - 4], fcn.00423a72
jne 0x423a63
push ebx
push esi
push edi
lea eax, [ebp - 0x22c]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x423a56
lea eax, [ebp - 0x22c]
push eax
lea eax, [ebp - 0x124]
push eax
call sub.MSVCRT.dll_strcpy
lea eax, [ebp - 0x124]
push str.ws2_32
push eax
call sub.MSVCRT.dll_strcat
mov ebx, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
add esp, 0x10
lea eax, [ebp - 0x124]
push eax
call ebx
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
test esi, esi
je 0x4239cd
push str.getaddrinfo
push esi
call edi
test eax, eax
jne 0x4239c9
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
xor esi, esi
test esi, esi
jne 0x423a1c
lea eax, [ebp - 0x22c]
push eax
lea eax, [ebp - 0x124]
push eax
call sub.MSVCRT.dll_strcpy
lea eax, [ebp - 0x124]
push str.wship6
push eax
call sub.MSVCRT.dll_strcat
add esp, 0x10
lea eax, [ebp - 0x124]
push eax
call ebx
mov esi, eax
test esi, esi
je 0x423a56
push str.getaddrinfo
push esi
call edi
test eax, eax
jne 0x423a18
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
xor esi, esi
test esi, esi
je 0x423a56
xor ebx, ebx
push dword [ebp + ebx*8 - 0x18]
push esi
call edi
test eax, eax
mov dword [ebp + ebx*8 - 0x14], eax
je 0x423a35
inc ebx
cmp ebx, 3
jl 0x423a1e
jmp 0x423a3e
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
xor esi, esi
test esi, esi
je 0x423a56
xor eax, eax
mov ecx, dword [ebp + eax - 0x14]
mov dword [eax + 0x4a32c8], ecx
add eax, 8
cmp eax, 0x18
jl 0x423a44
pop edi
pop esi
mov dword [0x4ae794], 1
pop ebx
movzx eax, word [ebp + 8]
mov eax, dword [eax*8 + 0x4a32c8]
leave
ret 4

Function at 0x423ef8
Capabilities:
Resolve dns

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0x18]
push ebx
push esi
push edi
mov edi, dword [ebp + 0x1c]
push dword [ebp + 8]
and dword [edi], 0
and byte [eax], 0
call dword [sym.imp.WS2_32.dll_gethostbyname]
mov ebx, eax
test ebx, ebx
je 0x423f72
cmp word [ebx + 8], 2
jne 0x423f4e
cmp word [ebx + 0xa], 4
jne 0x423f4e
mov esi, dword [ebx + 0xc]
jmp 0x423f48
push dword [eax]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
call fcn.00423d91
test eax, eax
mov dword [edi], eax
je 0x423f6d
lea edi, [eax + 0x1c]
add esi, 4
mov eax, dword [esi]
test eax, eax
jne 0x423f2c
mov esi, dword [ebp + 0x18]
push 0x400
push dword [ebx]
push esi
call dword [sym.imp.MSVCRT.dll_strncpy]
and byte [esi + 0x400], 0
add esp, 0xc
xor eax, eax
jmp 0x423f98
push 8
pop eax
jmp 0x423f98
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
mov eax, 0x2af9
sub ecx, eax
je 0x423f98
dec ecx
je 0x423f93
dec ecx
je 0x423f8c
dec ecx
jmp 0x423f98
mov eax, 0x2afb
jmp 0x423f98
mov eax, 0x2afa
pop edi
pop esi
pop ebx
pop ebp
ret 0x18