joyce8/EMBER2024-capa huggingface dataset:
Function at 0x423d28
Capabilities:
Create service
Persist via windows service

Disassembly:
mov eax, 0x4841f0
call fcn.004801f0
sub esp, 0x24
push ebx
xor ebx, ebx
push esi
lea eax, [ebp - 0x20]
push ebx
push eax
mov esi, ecx
call fcn.0040c10b
lea eax, [ebp - 0x20]
mov dword [ebp - 4], ebx
push eax
lea eax, [ebp - 0x24]
push 0x4aa6d4
push eax
call fcn.00430d9c
push str.___service
push eax
lea eax, [ebp - 0x10]
mov byte [ebp - 4], 1
push eax
call fcn.00430d31
add esp, 0x20
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 3
call fcn.00430a4d
mov ecx, esi
call fcn.004311c6
push eax
lea ecx, [ebp - 0x14]
call fcn.00430b0d
lea eax, [ebp - 0x14]
lea ecx, [ebp - 0x10]
push eax
mov byte [ebp - 4], 4
call fcn.00430f2e
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 3
call fcn.00430a4d
lea ecx, [esi + 4]
call fcn.004311c6
push eax
lea ecx, [ebp - 0x1c]
call fcn.00430b0d
lea ecx, [esi + 8]
mov byte [ebp - 4], 5
call fcn.004311c6
push eax
lea ecx, [ebp - 0x18]
call fcn.00430b0d
push ebx
push ebx
push ebx
push ebx
push ebx
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 6
call fcn.004311c6
push eax
push 1
push 2
push 0x10
push 0xf01ff
lea ecx, [ebp - 0x18]
call fcn.004311c6
push eax
lea ecx, [ebp - 0x1c]
call fcn.004311c6
push eax
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_CreateServiceW]
cmp eax, ebx
jne 0x423e55
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x431
jne 0x423e35
lea eax, [ebp - 0x30]
push str.The_Ammyy_service_is_already_registered
push eax
call fcn.0042c02a
pop ecx
lea eax, [ebp - 0x30]
pop ecx
push 0x49451c
push eax
call sub.MSVCRT.dll__CxxThrowException
push eax
lea eax, [ebp - 0x30]
push str.ERROR__d_CreateServiceW___while_registering_the_Ammyy_service
push eax
call fcn.0042c02a
add esp, 0xc
lea eax, [ebp - 0x30]
push 0x49451c
push eax
call sub.MSVCRT.dll__CxxThrowException
push eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push 1
mov ecx, esi
call fcn.00423ea4
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 5
call fcn.00430a4d
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 3
call fcn.00430a4d
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], bl
call fcn.00430a4d
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x20]
call fcn.00430a4d
mov ecx, dword [ebp - 0xc]
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 4
Function at 0x423ea4
Capabilities:
Manipulate safe mode programs

Disassembly:
mov eax, 0x484214
call fcn.004801f0
push ecx
push ecx
add ecx, 4
lea eax, [ebp - 0x10]
push ecx
push str.SYSTEMCurrentControlSetControlSafeBootNetwork_
push eax
call fcn.0042f71c
add esp, 0xc
and dword [ebp - 4], 0
cmp byte [ebp + 8], 0
je 0x423f27
lea ecx, [ebp + 8]
call fcn.0042c0bb
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 1
call fcn.004311c6
push eax
push reloc.WS2_32.dll_bind
lea ecx, [ebp + 8]
call fcn.0042d0e9
push 0x4aa6d8
lea ecx, [ebp - 0x14]
call fcn.0042f44e
push eax
push 0
lea ecx, [ebp + 8]
mov byte [ebp - 4], 2
call fcn.0042d35e
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 1
call fcn.0042f3db
and byte [ebp - 4], 0
lea ecx, [ebp + 8]
call fcn.0042d086
jmp 0x423f3c
lea ecx, [ebp - 0x10]
call fcn.004311c6
push eax
push reloc.WS2_32.dll_bind
call fcn.0042d3b1
pop ecx
pop ecx
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x10]
call fcn.0042f3db
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
leave
ret 4
Function at 0x423f56
Capabilities:
Delete service
Query service status
Stop service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
push ebx
mov ebx, ecx
push esi
push edi
push 0xf01ff
lea ecx, [ebx + 4]
call fcn.004311c6
push eax
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov edi, eax
test edi, edi
je 0x4240ca
mov esi, dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
lea eax, [ebp - 0x28]
push eax
push edi
call esi
test eax, eax
jne 0x423fc2
call dword [sym.imp.KERNEL32.dll_GetLastError]
push edi
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push esi
lea eax, [ebp - 0xc]
push str.ERROR__d_QueryServiceStatus__
push eax
call fcn.0042c02a
add esp, 0xc
lea eax, [ebp - 0xc]
push 0x49451c
push eax
call sub.MSVCRT.dll__CxxThrowException
cmp dword [ebp - 0x24], 1
je 0x424050
lea eax, [ebp - 0x28]
push eax
push 1
push edi
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
jne 0x42401a
call dword [sym.imp.KERNEL32.dll_GetLastError]
push edi
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push esi
lea eax, [ebp - 0xc]
push str.ERROR__d_ControlService__
push eax
call fcn.0042c02a
add esp, 0xc
lea eax, [ebp - 0xc]
push 0x49451c
push eax
call sub.MSVCRT.dll__CxxThrowException
cmp dword [ebp - 0x24], 3
jne 0x424025
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [ebp - 0x28]
push eax
push edi
call esi
test eax, eax
jne 0x42400c
cmp dword [ebp - 0x24], 1
je 0x424050
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
lea eax, [ebp - 0xc]
push str.The_Ammyy_service_could_not_be_stopped
push eax
call fcn.0042c02a
pop ecx
lea eax, [ebp - 0xc]
pop ecx
push 0x49451c
push eax
call sub.MSVCRT.dll__CxxThrowException
cmp dword [ebp + 0xc], 0
je 0x4240bc
push edi
call dword [sym.imp.ADVAPI32.dll_DeleteService]
test eax, eax
jne 0x4240b3
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 - 0xc]
jne 0x424096
push str.The_Ammyy_service_is_already_marked_for_removing
push eax
call fcn.0042c02a
pop ecx
lea eax, [ebp - 0xc]
pop ecx
push 0x49451c
push eax
call sub.MSVCRT.dll__CxxThrowException
push esi
push str.The_Ammyy_service_could_not_be_removed__error_d
push eax
call fcn.0042c02a
add esp, 0xc
lea eax, [ebp - 0xc]
push 0x49451c
push eax
call sub.MSVCRT.dll__CxxThrowException
push 0
mov ecx, ebx
call fcn.00423ea4
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop edi
pop esi
pop ebx
leave
ret 8
lea eax, [ebp - 0xc]
push str.The_Ammyy_service_could_not_be_found
push eax
call fcn.0042c02a
pop ecx
lea eax, [ebp - 0xc]
pop ecx
push 0x49451c
push eax
call sub.MSVCRT.dll__CxxThrowException
Function at 0x4240e8
Capabilities:
Start service

Disassembly:
mov eax, 0x484228
call fcn.004801f0
sub esp, 0x18
push esi
push 0xf01ff
add ecx, 4
call fcn.004311c6
push eax
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov esi, eax
test esi, esi
jne 0x424131
lea eax, [ebp - 0x18]
push str.The_Ammyy_service_could_not_be_found
push eax
call fcn.0042c02a
pop ecx
lea eax, [ebp - 0x18]
pop ecx
push 0x49451c
push eax
call sub.MSVCRT.dll__CxxThrowException
push 0
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_StartServiceA]
test eax, eax
jne 0x424182
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.0040c4f6
push dword [ebp + 8]
and dword [ebp - 4], 0
lea eax, [ebp - 0x24]
push edi
push str.ERROR__d___S__while_starting_the_AMMYY_service
push eax
call fcn.0042c02a
add esp, 0x18
lea eax, [ebp - 0x24]
push 0x49451c
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 0x4244a7
Capabilities:
Delete service
Query service status
Start service

Disassembly:
mov eax, 0x4842b0
call fcn.004801f0
sub esp, 0xa8
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 0x4244e7
lea eax, [ebp - 0x54]
push str.JustLunch___Invalid_Session
push eax
call fcn.0042c02a
pop ecx
lea eax, [ebp - 0x54]
pop ecx
push 0x49451c
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 0x424521
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x6c]
push str.OpenSCManager___error__d
push eax
call fcn.0042c02a
add esp, 0xc
lea eax, [ebp - 0x6c]
push 0x49451c
push eax
call sub.MSVCRT.dll__CxxThrowException
push 1
push eax
mov ecx, ebx
mov dword [ebp - 4], esi
call fcn.00423f56
jmp 0x42453b
push 2
mov ecx, ebx
pop edi
mov dword [ebp - 0x14], esi
push dword [ebp - 0x18]
mov dword [ebp - 4], edi
call fcn.00423d28
lea ecx, [ebx + 4]
call fcn.004311c6
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 0x424594
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x30]
push str.OpenService___error__d
push eax
call fcn.0042c02a
add esp, 0xc
lea eax, [ebp - 0x30]
push 0x49451c
push eax
call sub.MSVCRT.dll__CxxThrowException
push dword [ebp + 8]
lea eax, [ebp - 0xb4]
push 0x4aa8a8
push eax
call dword [sym.imp.MSVCRT.dll_swprintf]
lea eax, [ebp - 0xb4]
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 0x4245f1
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x78]
push str.StartService___error__d
push eax
call fcn.0042c02a
add esp, 0xc
lea eax, [ebp - 0x78]
push 0x49451c
push eax
call sub.MSVCRT.dll__CxxThrowException
lea eax, [ebp - 0x94]
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
jne 0x424629
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x3c]
push str.QueryServiceStatus___error__d
push eax
call fcn.0042c02a
add esp, 0xc
lea eax, [ebp - 0x3c]
push 0x49451c
push eax
call sub.MSVCRT.dll__CxxThrowException
cmp dword [ebp - 0x90], 1
je 0x42463c
push 0xa
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x4245f1
push esi
call dword [sym.imp.ADVAPI32.dll_DeleteService]
test eax, eax
jne 0x42466d
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x48]
push str.DeleteService___error__d
push eax
call fcn.0042c02a
add esp, 0xc
lea eax, [ebp - 0x48]
push 0x49451c
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.00423ea4
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret 8
Function at 0x4274ee
Capabilities:
Create process on windows

Disassembly:
mov eax, 0x4847d8
call fcn.004801f0
push ecx
push ecx
push ebx
push esi
mov esi, ecx
lea ecx, [ebp - 0x10]
lea eax, [esi + 0x10]
push eax
call fcn.0042f0e6
xor ebx, ebx
lea ecx, [ebp - 0x10]
mov dword [ebp - 4], ebx
call fcn.0042fbb1
test eax, eax
je 0x427531
lea eax, [ebp - 0x14]
mov ecx, esi
push eax
call fcn.0042eb81
push eax
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 1
call fcn.0042f510
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], bl
call fcn.0042f3db
push 1
push ebx
push ebx
lea ecx, [ebp - 0x10]
call fcn.004311c6
push eax
push 0x4a88b4
push ebx
call dword [sym.imp.SHELL32.dll_ShellExecuteA]
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x10]
call fcn.0042f3db
mov ecx, dword [ebp - 0xc]
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret

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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push esi
mov esi, ecx
cmp dword [esi], 0xffffffff
je 0x42788f
lea eax, [ebp - 0xc]
push str.CreateInternal__1
push eax
call fcn.0042c02a
pop ecx
lea eax, [ebp - 0xc]
pop ecx
push 0x49451c
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 0x4278c8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0xc]
push str.Error__d_socket__
push eax
call fcn.0042c02a
add esp, 0xc
lea eax, [ebp - 0xc]
push 0x49451c
push eax
call sub.MSVCRT.dll__CxxThrowException
pop esi
leave
ret

Function at 0x4279e1
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x118
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 - 0x118], 1
mov dword [ebp - 8], eax
mov eax, dword [esi]
imul edx, edx, 0x3e8
mov dword [ebp - 0x114], eax
lea eax, [ebp - 8]
push eax
push edi
lea eax, [ebp - 0x118]
push edi
push eax
push edi
mov dword [ebp - 4], edx
call dword [sym.imp.WS2_32.dll_select]
cmp eax, edi
jne 0x427a3b
or eax, 0xffffffff
pop edi
pop esi
leave
ret 4
jle 0x427a84
lea eax, [ebp - 0x118]
push eax
push dword [esi]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x427a84
push edi
push edi
push dword [esi]
call dword [sym.imp.WS2_32.dll_accept]
cmp eax, 0xffffffff
jne 0x427a35
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x14]
push str.accept___error_d
push eax
call fcn.0042c02a
add esp, 0xc
lea eax, [ebp - 0x14]
push 0x49451c
push eax
call sub.MSVCRT.dll__CxxThrowException
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x14]
push str.select___error_d
push eax
call fcn.0042c02a
add esp, 0xc
lea eax, [ebp - 0x14]
push 0x49451c
push eax
call sub.MSVCRT.dll__CxxThrowException
Function at 0x427aaa
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 0x427ae5
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
leave
ret 8

Function at 0x427b3d
Capabilities:
Connect socket
Get socket status

Disassembly:
mov eax, 0x4848c0
call fcn.004801f0
sub esp, 0x230
push ebx
push esi
push edi
lea ecx, [ebp - 0x10]
call fcn.00427858
xor ebx, ebx
lea ecx, [ebp - 0x10]
mov dword [ebp - 4], ebx
call fcn.00427863
push ebx
push dword [ebp - 0x10]
call fcn.00428888
mov eax, dword [ebp + 8]
pop ecx
pop ecx
mov dword [ebp - 0x30], eax
push dword [ebp + 0xc]
mov word [ebp - 0x34], 2
call dword [sym.imp.WS2_32.dll_htons]
mov edi, dword [ebp - 0x10]
mov word [ebp - 0x32], ax
lea eax, [ebp - 0x34]
push 0x10
push eax
push edi
call dword [sym.imp.WS2_32.dll_connect]
xor esi, esi
inc esi
test eax, eax
je 0x427c5e
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
jne 0x427c73
mov eax, dword [ebp + 0x10]
mov ecx, 0x3e8
cdq
idiv ecx
mov dword [ebp - 0x238], edi
mov dword [ebp - 0x23c], esi
mov dword [ebp - 0x134], edi
mov dword [ebp - 0x138], esi
mov dword [ebp - 0x18], eax
imul edx, edx, 0x3e8
lea eax, [ebp - 0x18]
mov dword [ebp - 0x14], edx
push eax
lea eax, [ebp - 0x138]
push eax
lea eax, [ebp - 0x23c]
push eax
push ebx
push ebx
call dword [sym.imp.WS2_32.dll_select]
cmp eax, ebx
jl 0x427c9a
cmp eax, esi
jg 0x427c9a
cmp eax, ebx
je 0x427c90
cmp eax, esi
jne 0x427c27
lea eax, [ebp - 0x138]
push eax
push edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
jne 0x427c90
lea eax, [ebp - 0x23c]
push eax
push edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
jne 0x427c5e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x24]
push str.select___error_d
push eax
call fcn.0042c02a
add esp, 0xc
lea eax, [ebp - 0x24]
push 0x49451c
push eax
call sub.MSVCRT.dll__CxxThrowException
push esi
push dword [ebp - 0x10]
call fcn.00428888
pop ecx
pop ecx
lea ecx, [ebp - 0x10]
call fcn.0042793a
mov ebx, eax
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x10]
call fcn.0042785e
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.004278cb
jmp 0x427c73
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x24]
push str.select___error_d
push eax
call fcn.0042c02a
add esp, 0xc
lea eax, [ebp - 0x24]
push 0x49451c
push eax
call sub.MSVCRT.dll__CxxThrowException

Function at 0x427cc0
Capabilities:
Set socket configuration

Disassembly:
push dword [esp + 4]
call fcn.00427ccf
pop ecx
jmp fcn.00427d19
Function at 0x427ccf
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
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 0x427d17
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
lea eax, [ebp - 0x10]
push str.ERROR__d_disabling_Nagles_algorithm
push eax
call fcn.0042c02a
add esp, 0xc
lea eax, [ebp - 0x10]
push 0x49451c
push eax
call sub.MSVCRT.dll__CxxThrowException
leave
ret

Function at 0x427ed2
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x22c
cmp dword [0x4b5dc8], 0
mov dword [ebp - 0x18], str.getaddrinfo
mov dword [ebp - 0x14], 0x42806b
mov dword [ebp - 0x10], str.getnameinfo
mov dword [ebp - 0xc], 0x42859c
mov dword [ebp - 8], str.freeaddrinfo
mov dword [ebp - 4], fcn.0042802f
jne 0x428020
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 0x428013
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 0x427f8a
push str.getaddrinfo
push esi
call edi
test eax, eax
jne 0x427f86
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
xor esi, esi
test esi, esi
jne 0x427fd9
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 0x428013
push str.getaddrinfo
push esi
call edi
test eax, eax
jne 0x427fd5
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
xor esi, esi
test esi, esi
je 0x428013
xor ebx, ebx
push dword [ebp + ebx*8 - 0x18]
push esi
call edi
test eax, eax
mov dword [ebp + ebx*8 - 0x14], eax
je 0x427ff2
inc ebx
cmp ebx, 3
jl 0x427fdb
jmp 0x427ffb
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
xor esi, esi
test esi, esi
je 0x428013
xor eax, eax
mov ecx, dword [ebp + eax - 0x14]
mov dword [eax + 0x4aabb8], ecx
add eax, 8
cmp eax, 0x18
jl 0x428001
pop edi
pop esi
mov dword [0x4b5dc8], 1
pop ebx
movzx eax, word [ebp + 8]
mov eax, dword [eax*8 + 0x4aabb8]
leave
ret 4
Function at 0x4284b5
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 0x42852f
cmp word [ebx + 8], 2
jne 0x42850b
cmp word [ebx + 0xa], 4
jne 0x42850b
mov esi, dword [ebx + 0xc]
jmp 0x428505
push dword [eax]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
call fcn.0042834e
test eax, eax
mov dword [edi], eax
je 0x42852a
lea edi, [eax + 0x1c]
add esi, 4
mov eax, dword [esi]
test eax, eax
jne 0x4284e9
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 0x428555
push 8
pop eax
jmp 0x428555
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
mov eax, 0x2af9
sub ecx, eax
je 0x428555
dec ecx
je 0x428550
dec ecx
je 0x428549
dec ecx
jmp 0x428555
mov eax, 0x2afb
jmp 0x428555
mov eax, 0x2afa
pop edi
pop esi
pop ebx
pop ebp
ret 0x18

Function at 0x428888
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
xor eax, eax
cmp byte [ebp + 0xc], al
sete al
mov dword [ebp + 0xc], eax
lea eax, [ebp + 0xc]
push eax
push 0x8004667e
push dword [ebp + 8]
call dword [sym.imp.WS2_32.dll_ioctlsocket]
test eax, eax
je 0x4288d8
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0xc]
push str.Error_d_in_SetBlockingMode__u_
push eax
call fcn.0042c02a
add esp, 0x10
lea eax, [ebp - 0xc]
push 0x49451c
push eax
call sub.MSVCRT.dll__CxxThrowException
leave
ret

Function at 0x4288da
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
xor eax, eax
push 4
cmp byte [ebp + 0xc], al
setne al
mov word [ebp + 0xc], ax
mov ax, word [ebp + 0x10]
mov word [ebp + 0xe], ax
lea eax, [ebp + 0xc]
push eax
push 0x80
push 0xffff
push dword [ebp + 8]
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
je 0x428937
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0xc]
push str.setsockopt_SO_LINGER___u
push eax
call fcn.0042c02a
add esp, 0xc
lea eax, [ebp - 0xc]
push 0x49451c
push eax
call sub.MSVCRT.dll__CxxThrowException
leave
ret

Function at 0x428939
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
lea eax, [ebp - 4]
push 4
push eax
push 0x1001
push 0xffff
mov dword [ebp - 4], 0x10000
push dword [ebp + 8]
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
je 0x428989
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x10]
push str.Error_d_setsockopt__
push eax
call fcn.0042c02a
add esp, 0xc
lea eax, [ebp - 0x10]
push 0x49451c
push eax
call sub.MSVCRT.dll__CxxThrowException
leave
ret
Function at 0x42898b
Capabilities:
Get socket status
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x11c
mov eax, dword [ebp + 0x10]
push esi
mov esi, ecx
xor edx, edx
mov ecx, 0x3e8
mov dword [ebp - 0x11c], 1
div ecx
mov dword [ebp - 8], eax
mov eax, dword [esi]
imul edx, edx, 0x3e8
mov dword [ebp - 0x118], eax
lea eax, [ebp - 8]
push eax
push 0
lea eax, [ebp - 0x11c]
push 0
push eax
push 0
mov dword [ebp - 4], edx
call dword [sym.imp.WS2_32.dll_select]
test eax, eax
mov dword [ebp + 0x10], eax
jl 0x428a16
cmp eax, 1
jg 0x428a16
lea eax, [ebp - 0x11c]
push eax
push dword [esi]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x428a12
push 0
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [esi]
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jg 0x428a0d
or eax, 0xffffffff
pop esi
leave
ret 0xc
xor eax, eax
jmp 0x428a0d
call dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [esi]
push dword [ebp + 0x10]
push eax
push str.ERROR__d_in_TCP::TryRead__1__d_socket_X
push eax
lea eax, [ebp - 0x18]
push eax
call fcn.0042901f
add esp, 0x18
lea eax, [ebp - 0x18]
push 0x499b78
push eax
call sub.MSVCRT.dll__CxxThrowException

Function at 0x428f10
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x11c
mov eax, dword [ebp + 8]
push esi
mov esi, dword [ecx + 8]
mov ecx, 0x3e8
cdq
idiv ecx
mov dword [ebp - 0x118], esi
mov dword [ebp - 0x11c], 1
imul edx, edx, 0x3e8
mov dword [ebp - 8], eax
lea eax, [ebp - 8]
push eax
push 0
lea eax, [ebp - 0x11c]
push 0
push eax
lea eax, [esi + 1]
push eax
mov dword [ebp - 4], edx
call dword [sym.imp.WS2_32.dll_select]
test eax, eax
jl 0x428f7e
cmp eax, 2
jg 0x428f7e
lea eax, [ebp - 0x11c]
push eax
push esi
call sub.WS2_32.dll___WSAFDIsSet
neg eax
sbb eax, eax
pop esi
neg eax
leave
ret 4
push eax
push str.ERROR_in_TransportTCP1::IsReadyForRead__1__d
lea eax, [ebp - 0x18]
push 0
push eax
call fcn.0042901f
add esp, 0x10
lea eax, [ebp - 0x18]
push 0x499b78
push eax
call sub.MSVCRT.dll__CxxThrowException