joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4057f0
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x224
mov eax, dword [0x438170]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push edi
mov edi, dword [ebp + 0xc]
push edi
mov ebx, ecx
mov dword [ebp - 0x224], eax
call esi
cmp eax, 0xffffffff
je 0x40582d
push edi
call esi
test al, 0x10
jne 0x4059f1
push 0x104
lea eax, [ebp - 0x210]
push edi
push eax
call fcn.00414d8d
xor eax, eax
add esp, 0xc
mov word [ebp - 0xa], ax
lea eax, [ebp - 0x210]
push 0x5c
push eax
call fcn.004155f4
add esp, 8
test eax, eax
je 0x4059f1
lea eax, [ebp - 0x210]
push 0x5c
push eax
call fcn.004155f4
xor ecx, ecx
add esp, 8
mov word [eax], cx
lea eax, [ebp - 0x210]
push eax
call esi
test al, 0x10
je 0x4059f1
xorps xmm0, xmm0
push edi
movlpd qword [ebp - 0x220], xmm0
call esi
cmp eax, 0xffffffff
je 0x4058df
push str.Local_file_is_exist_already__download_from_last_stop_____Y_N__n
push ebx
call fcn.00401a80
add esp, 8
call fcn.00426d5c
cmp eax, 0x59
je 0x4058b8
cmp eax, 0x79
jne 0x4058df
mov ecx, edi
call fcn.0040a250
mov ecx, edx
push ecx
push eax
push str.Download_from__I64u_n
push ebx
mov dword [ebp - 0x21c], eax
mov dword [ebp - 0x214], ecx
call fcn.00401a80
add esp, 0x10
jmp 0x4058f7
mov eax, dword [ebp - 0x21c]
mov dword [ebp - 0x214], eax
mov eax, dword [ebp - 0x220]
mov dword [ebp - 0x21c], eax
push 0x458
call fcn.00414cfb
mov esi, eax
add esp, 4
test esi, esi
je 0x4059d9
push 0x458
push 0
push esi
call fcn.0041e930
add esp, 0xc
mov dword [esi], 0x458
mov eax, dword [ebx + 0xaae0]
push 0x104
push dword [ebp - 0x224]
mov dword [esi + 0x10], eax
inc dword [ebx + 0xaae0]
lea eax, [esi + 0x18]
push eax
mov dword [esi + 4], 0x28
call fcn.00414d8d
add esp, 0xc
xor eax, eax
push 0x104
mov word [esi + 0x21e], ax
lea eax, [esi + 0x220]
push edi
push eax
call fcn.00414d8d
xor eax, eax
mov word [esi + 0x426], ax
mov eax, dword [ebp - 0x21c]
add esp, 0xc
push dword [esi]
mov dword [esi + 0x448], eax
mov eax, dword [ebp - 0x214]
push esi
push 0x84
mov ecx, ebx
mov dword [esi + 0x44c], eax
call fcn.004082b0
test eax, eax
jns 0x4059c4
push esi
call fcn.00414cc3
add esp, 4
mov eax, 0x13ab
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004144c7
mov esp, ebp
pop ebp
ret 8
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004144c7
mov esp, ebp
pop ebp
ret 8
mov eax, 8
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004144c7
mov esp, ebp
pop ebp
ret 8
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
mov eax, 0x7b
pop ebx
call fcn.004144c7
mov esp, ebp
pop ebp
ret 8
Function at 0x407b10
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov eax, dword [0x438170]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
push esi
push edi
push 0x114
mov edi, ecx
mov dword [ebp - 0x20], eax
xor ebx, ebx
call fcn.00414cfb
mov esi, eax
add esp, 4
test esi, esi
je 0x407d22
push 0x114
push ebx
push esi
call fcn.0041e930
mov eax, dword [ebp + 8]
add esp, 0xc
mov ecx, edi
push 0x114
push esi
push 0x83
mov dword [esi], 0x114
mov dword [esi + 4], 0x40
mov dword [esi + 8], eax
call fcn.004082b0
test eax, eax
jns 0x407b9d
push esi
call fcn.00414cc3
add esp, 4
pop edi
pop esi
mov eax, 0x13ab
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004144c7
mov esp, ebp
pop ebp
ret 8
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x18]
push eax
push 0x40
push 0x83
push 0xea60
mov ecx, edi
call fcn.00408360
test eax, eax
js 0x407b85
jne 0x407bd6
pop edi
pop esi
mov eax, 0x5b4
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004144c7
mov esp, ebp
pop ebp
ret 8
mov esi, dword [ebp - 0x18]
mov eax, dword [esi + 4]
cmp eax, 0x40
jne 0x407cc5
push dword [esi + 8]
push dword [esi + 0xc]
push dword [ebp - 0x20]
push str.Screen_file__s___d_bytes__session__d_n
push edi
call fcn.00401a80
mov ecx, dword [esi + 0xc]
lea eax, [esi + 0x10]
mov dword [ebp - 0x1c], eax
movzx eax, word [eax + 0xe]
add esp, 0x14
xor edx, edx
mov dword [ebp - 0x18], ecx
cmp eax, 0x10
jae 0x407c22
mov cl, al
mov edx, 1
shl edx, cl
mov ecx, dword [ebp - 0x18]
shl edx, 2
xorps xmm0, xmm0
movq qword [ebp - 0x14], xmm0
mov eax, 0x4d42
mov word [ebp - 0x14], ax
lea eax, [ecx + 0xe]
mov dword [ebp - 0x12], eax
mov eax, dword [esi + 0x10]
add eax, 0xe
push 0x434e6c
push dword [ebp - 0x20]
add eax, edx
mov dword [ebp - 0xc], ebx
mov word [ebp - 8], bx
mov dword [ebp - 0xa], eax
call fcn.00415088
mov esi, eax
add esp, 8
test esi, esi
je 0x407c9b
push esi
push 0xe
lea eax, [ebp - 0x14]
push 1
push eax
call fcn.00415d69
push esi
push dword [ebp - 0x18]
push 1
push dword [ebp - 0x1c]
call fcn.00415d69
push esi
call fcn.00415e53
add esp, 0x24
mov eax, ebx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004144c7
mov esp, ebp
pop ebp
ret 8
call fcn.00415288
push dword [eax]
push str.Save_file_fail__errno__d_n_n
push edi
call fcn.00401a80
add esp, 0xc
mov eax, ebx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004144c7
mov esp, ebp
pop ebp
ret 8
cmp eax, 0x3c0
jne 0x407cf9
lea eax, [esi + 0x14]
push eax
push dword [esi + 0x10]
push str.Screen_fail__E__d___s_n
push edi
call fcn.00401a80
mov ebx, dword [esi + 0x10]
add esp, 0x10
mov eax, ebx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004144c7
mov esp, ebp
pop ebp
ret 8
push eax
push str.Packet_return_invalid___code__x_n
push edi
call fcn.00401a80
add esp, 0xc
mov ebx, 0x16
pop edi
pop esi
mov eax, ebx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004144c7
mov esp, ebp
pop ebp
ret 8
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
mov eax, 8
pop ebx
call fcn.004144c7
mov esp, ebp
pop ebp
ret 8
Function at 0x408e40
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x124
mov eax, dword [0x438170]
xor eax, esp
mov dword [esp + 0x120], eax
push ebx
push esi
mov esi, ecx
push edi
cmp dword [esi + 0xeb3c], 0
jne 0x40906a
lea esp, [esp]
mov eax, dword [esi + 0xc]
mov dword [esp + 0x14], 0
mov dword [esp + 0xc], 0
mov dword [esp + 0x10], 0
cmp eax, 6
jne 0x408f02
mov edi, dword [esi + 4]
test edi, edi
je 0x409053
mov eax, dword [edi + 0x10c]
lea ecx, [esp + 0x18]
push ecx
push 0
push 0
lea ecx, [esp + 0x2c]
mov dword [esp + 0x30], eax
push ecx
inc eax
push eax
mov dword [esp + 0x34], 1
mov dword [esp + 0x2c], 0
mov dword [esp + 0x30], 0xc350
call dword [sym.imp.WS2_32.dll_select]
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [edi + 4], eax
test ebx, ebx
jle 0x408f91
mov ecx, dword [esi + 4]
lea edx, [esp + 0x10]
mov eax, dword [ecx]
push edx
lea edx, [esp + 0x10]
push edx
lea edx, [esp + 0x1c]
push edx
call dword [eax + 0x14]
jmp 0x408f8d
cmp eax, 1
jne 0x40905d
mov ecx, dword [esi + 8]
test ecx, ecx
je 0x409053
mov edi, dword [0x43a1c0]
imul ecx, ecx, 0x384a0
add edi, 0xfffc7b68
add edi, ecx
cmp dword [edi + 0x18], 0
jne 0x408f93
push eax
call dword [sym.imp.WINMM.dll_timeBeginPeriod]
push 0x32
push dword [edi + 0x48]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push 1
mov ebx, eax
call dword [sym.imp.WINMM.dll_timeEndPeriod]
cmp dword [edi + 0x18], 0
jne 0x408f93
cmp ebx, 0xffffffff
jne 0x408f70
push dword [edi + 0x48]
mov ebx, dword [sym.imp.KERNEL32.dll_SetEvent]
mov dword [edi + 0x18], 1
call ebx
push dword [edi + 0x4c]
call ebx
jmp 0x408f93
test ebx, ebx
jne 0x408f9d
mov ecx, dword [esi + 8]
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0x10]
push eax
lea edx, [esp + 0x1c]
call fcn.00401600
add esp, 8
test eax, eax
jg 0x408f9d
jns 0x408f9d
mov dword [esi + 0xeb3c], 1
cmp dword [esp + 0xc], 0
je 0x40905d
cmp dword [esp + 0x10], 0
je 0x40905d
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0x1c]
push eax
mov ecx, esi
call fcn.004085e0
cmp dword [esp + 0xc], 0
je 0x40905d
push 0x14
call fcn.00414cfb
mov edi, eax
add esp, 4
test edi, edi
je 0x40905d
xorps xmm0, xmm0
movq qword [edi], xmm0
movq qword [edi + 8], xmm0
push edi
mov dword [edi + 0x10], 0
call dword [sym.imp.KERNEL32.dll_GetSystemTimeAsFileTime]
mov eax, dword [esp + 0xc]
mov dword [edi + 8], eax
mov eax, dword [esp + 0x10]
mov dword [edi + 0xc], eax
mov eax, dword [esp + 0x14]
mov dword [edi + 0x10], eax
lea eax, [esi + 0xeb6c]
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
lea ecx, [esi + 0xeb68]
call fcn.00409c10
test al, al
je 0x409044
mov ecx, dword [esi + 0xeb88]
mov eax, dword [esi + 0xeb84]
mov dword [eax + ecx*4], edi
inc dword [esi + 0xeb88]
lea eax, [esi + 0xeb6c]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x40905d
mov dword [esi + 0xeb3c], 1
cmp dword [esi + 0xeb3c], 0
je 0x408e70
mov ecx, dword [esp + 0x12c]
pop edi
pop esi
pop ebx
xor ecx, esp
xor eax, eax
call fcn.004144c7
mov esp, ebp
pop ebp
ret
Function at 0x409cf0
Capabilities:
Check os version

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x130
mov eax, dword [0x438170]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 0x11c
lea eax, [ebp - 0x128]
push 0
push eax
call fcn.0041e930
mov esi, dword [sym.imp.KERNEL32.dll_GetVersionExW]
add esp, 0xc
lea eax, [ebp - 0x128]
push eax
mov dword [ebp - 0x128], 0x11c
call esi
test eax, eax
jne 0x409d4c
lea eax, [ebp - 0x128]
push eax
mov dword [ebp - 0x128], 0x114
call esi
cmp dword [ebp - 0x118], 2
jne 0x409eb5
movzx eax, byte [ebp - 0x124]
shl ax, 8
movzx ecx, ax
movzx eax, byte [ebp - 0x120]
or ecx, eax
movzx eax, byte [ebp - 0x14]
shl ax, 8
movzx eax, ax
shl ecx, 0x10
or ecx, eax
movzx eax, byte [ebp - 0x12]
or ecx, eax
mov eax, ecx
and eax, 0xffff0000
mov dword [ebp - 0x130], ecx
cmp eax, 0x6020000
jne 0x409e64
mov ebx, dword [sym.imp.KERNEL32.dll_VerSetConditionMask]
mov dword [ebp - 0x12c], 8
mov edi, edi
mov edi, 4
jmp 0x409dc0
mov esi, 4
jmp 0x409dd0
push 0x11c
lea eax, [ebp - 0x128]
push 0
push eax
call fcn.0041e930
mov eax, dword [ebp - 0x12c]
add esp, 0xc
mov dword [ebp - 0x128], 0x11c
push 3
push 2
push 0
push 0
mov dword [ebp - 0x124], eax
mov dword [ebp - 0x120], edi
mov word [ebp - 0x14], si
call ebx
push 3
push 1
push edx
push eax
call ebx
push 3
push 0x20
push edx
push eax
call ebx
push 3
push 0x10
push edx
push eax
call ebx
push edx
push eax
push 0x33
lea eax, [ebp - 0x128]
push eax
call dword [sym.imp.KERNEL32.dll_VerifyVersionInfoW]
cmp eax, 1
je 0x409e77
dec esi
jns 0x409dd0
dec edi
jns 0x409dc0
mov eax, dword [ebp - 0x12c]
dec eax
mov dword [ebp - 0x12c], eax
cmp eax, 6
jge 0x409db0
mov ecx, dword [ebp - 0x130]
mov eax, ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004144c7
mov esp, ebp
pop ebp
ret
movzx eax, byte [ebp - 0x124]
shl ax, 8
movzx ecx, ax
movzx eax, byte [ebp - 0x120]
or ecx, eax
movzx eax, byte [ebp - 0x14]
shl ax, 8
movzx eax, ax
shl ecx, 0x10
or ecx, eax
movzx eax, byte [ebp - 0x12]
or eax, ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004144c7
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
xor eax, eax
pop ebx
call fcn.004144c7
mov esp, ebp
pop ebp
ret
Function at 0x409ed0
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
push ebx
push esi
mov esi, dword [0x4505b0]
push edi
mov edi, edx
mov ebx, ecx
test esi, esi
jne 0x409f9f
push 0x400
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, eax
test esi, esi
je 0x409f8f
xor ecx, ecx
mov edi, edi
mov eax, ecx
shr eax, 1
test cl, 1
je 0x409f0e
xor eax, 0xedb88320
test al, 1
je 0x409f1b
shr eax, 1
xor eax, 0xedb88320
jmp 0x409f1d
shr eax, 1
test al, 1
je 0x409f2a
shr eax, 1
xor eax, 0xedb88320
jmp 0x409f2c
shr eax, 1
test al, 1
je 0x409f39
shr eax, 1
xor eax, 0xedb88320
jmp 0x409f3b
shr eax, 1
test al, 1
je 0x409f48
shr eax, 1
xor eax, 0xedb88320
jmp 0x409f4a
shr eax, 1
test al, 1
je 0x409f57
shr eax, 1
xor eax, 0xedb88320
jmp 0x409f59
shr eax, 1
test al, 1
je 0x409f66
shr eax, 1
xor eax, 0xedb88320
jmp 0x409f68
shr eax, 1
test al, 1
je 0x409f75
shr eax, 1
xor eax, 0xedb88320
jmp 0x409f77
shr eax, 1
mov dword [esi + ecx*4], eax
inc ecx
cmp ecx, 0x100
jl 0x409f00
mov dword [0x4505b0], esi
jmp 0x409f95
mov esi, dword [0x4505b0]
test esi, esi
jne 0x409f9f
pop edi
pop esi
xor eax, eax
pop ebx
ret
or edx, 0xffffffff
test edi, edi
je 0x409fba
movzx eax, byte [ebx]
movzx ecx, dl
xor ecx, eax
shr edx, 8
xor edx, dword [esi + ecx*4]
lea ebx, [ebx + 1]
dec edi
jne 0x409fa6
pop edi
not edx
pop esi
mov eax, edx
pop ebx
ret

Function at 0x40a010
Capabilities:
Resolve dns

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
mov esi, ecx
test esi, esi
je 0x40a065
cmp byte [esi], 0
je 0x40a065
push esi
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
je 0x40a051
movsx ecx, word [eax + 0xa]
mov eax, dword [eax + 0xc]
push ecx
push dword [eax]
lea eax, [ebp - 4]
push eax
call fcn.0041bfc0
mov eax, dword [ebp - 4]
add esp, 0xc
xor ecx, ecx
cmp eax, 0xffffffff
cmove eax, ecx
pop esi
mov esp, ebp
pop ebp
ret
push esi
call dword [sym.imp.WS2_32.dll_inet_addr]
xor ecx, ecx
cmp eax, 0xffffffff
cmove eax, ecx
pop esi
mov esp, ebp
pop ebp
ret
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret

Function at 0x40a110
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push 0
push 0x80
push 3
push 0
push 1
push bind
push ecx
mov ebx, edx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x40a140
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
push edi
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ecx, dword [ebp + 8]
mov edi, eax
push edi
mov dword [ecx], edi
call fcn.00414cfb
add esp, 4
mov dword [ebx], eax
test eax, eax
je 0x40a17d
push 0
lea ecx, [ebp - 4]
push ecx
push edi
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40a18d
push dword [ebx]
call fcn.00414cc3
add esp, 4
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x40a1a0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
push esi
push edi
push 1
lea eax, [ebp - 0x24]
push eax
mov edi, edx
mov esi, ecx
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
push 0
push 0
push 1
lea eax, [ebp - 0x24]
push eax
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
push 0
push 0x80
lea eax, [ebp - 0x24]
push 2
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0x10]
push eax
push 1
push 0x40000000
push esi
mov dword [ebp - 0x10], 0xc
mov dword [ebp - 8], 1
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x40a20c
call dword [sym.imp.KERNEL32.dll_GetLastError]
pop edi
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret
push 0
lea eax, [ebp - 4]
push eax
push dword [ebp + 8]
push edi
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x40a236
call dword [sym.imp.KERNEL32.dll_GetLastError]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
mov eax, 1
pop esi
mov esp, ebp
pop ebp
ret

Function at 0x40a250
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
push 0
push 0x80
push 3
push 0
push 1
push bind
xorps xmm0, xmm0
push ecx
movlpd qword [ebp - 8], xmm0
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x40a2c0
lea eax, [ebp - 0x10]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x40a2a8
mov edi, dword [ebp - 0x10]
mov ebx, dword [ebp - 0xc]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, edi
mov edx, ebx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ebx, dword [ebp - 4]
mov edi, dword [ebp - 8]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, edi
mov edx, ebx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 8]
mov edx, dword [ebp - 4]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x40a430
Capabilities:
Act as tcp client
Connect tcp socket
Resolve dns
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 0xc]
test esi, esi
jne 0x40a44c
push 0x2726
call dword [sym.imp.WS2_32.dll_WSASetLastError]
or eax, 0xffffffff
pop esi
pop ebp
ret
cmp byte [esi], 0
je 0x40a4a0
push esi
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
je 0x40a487
movsx ecx, word [eax + 0xa]
mov eax, dword [eax + 0xc]
push ecx
push dword [eax]
lea eax, [ebp + 0xc]
push eax
call fcn.0041bfc0
mov eax, dword [ebp + 0xc]
xor ecx, ecx
add esp, 0xc
cmp eax, 0xffffffff
cmove eax, ecx
pop esi
mov dword [ebp + 0xc], eax
pop ebp
jmp fcn.0040a4b0
push esi
call dword [sym.imp.WS2_32.dll_inet_addr]
xor ecx, ecx
cmp eax, 0xffffffff
cmove eax, ecx
pop esi
mov dword [ebp + 0xc], eax
pop ebp
jmp fcn.0040a4b0
xor eax, eax
pop esi
mov dword [ebp + 0xc], eax
pop ebp
jmp fcn.0040a4b0
Function at 0x40a4b0
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x438170]
xor eax, ebp
mov dword [ebp - 8], eax
push esi
push edi
mov edi, dword [ebp + 0xc]
test edi, edi
jne 0x40a4e7
push 0x2726
call dword [sym.imp.WS2_32.dll_WSASetLastError]
or eax, 0xffffffff
pop edi
pop esi
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.004144c7
mov esp, ebp
pop ebp
ret
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov esi, eax
test esi, esi
js 0x40a4d4
push dword [ebp + 0x10]
xorps xmm0, xmm0
movq qword [ebp - 0x18], xmm0
mov eax, 2
movq qword [ebp - 0x10], xmm0
mov word [ebp - 0x18], ax
mov dword [ebp - 0x14], edi
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x16], ax
push 0x10
lea eax, [ebp - 0x18]
push eax
push esi
call dword [sym.imp.WS2_32.dll_connect]
test eax, eax
jns 0x40a54a
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
or eax, 0xffffffff
pop edi
pop esi
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.004144c7
mov esp, ebp
pop ebp
ret
mov edi, dword [sym.imp.WS2_32.dll_setsockopt]
push 4
lea eax, [ebp - 0x1c]
push eax
push 0x80
push 0xffff
push esi
mov dword [ebp - 0x1c], 0x50001
call edi
test eax, eax
jne 0x40a530
push 4
lea eax, [ebp - 0x20]
push eax
push 1
push 6
push esi
mov dword [ebp - 0x20], 1
call edi
test eax, eax
jne 0x40a530
mov ecx, dword [ebp - 8]
pop edi
mov eax, esi
xor ecx, ebp
pop esi
call fcn.004144c7
mov esp, ebp
pop ebp
ret
Function at 0x40cc00
Capabilities:
Resolve dns

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, ecx
push 0x100
lea eax, [edi + 8]
push esi
push eax
call fcn.004154d0
mov ebx, dword [ebp + 0xc]
add esp, 0xc
mov byte [edi + 0x107], 0
mov dword [edi + 0x108], ebx
test esi, esi
je 0x40cc94
cmp byte [esi], 0
je 0x40cc94
push esi
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
je 0x40cc74
movsx ecx, word [eax + 0xa]
mov eax, dword [eax + 0xc]
push ecx
push dword [eax]
lea eax, [ebp + 8]
push eax
call fcn.0041bfc0
mov eax, dword [ebp + 8]
add esp, 0xc
xor ecx, ecx
cmp eax, 0xffffffff
cmove eax, ecx
push ebx
push eax
mov ecx, edi
call fcn.0040ccb0
pop edi
pop esi
pop ebx
pop ecx
pop ebp
ret 8
push esi
call dword [sym.imp.WS2_32.dll_inet_addr]
xor ecx, ecx
cmp eax, 0xffffffff
cmove eax, ecx
push ebx
push eax
mov ecx, edi
call fcn.0040ccb0
pop edi
pop esi
pop ebx
pop ecx
pop ebp
ret 8
xor eax, eax
push ebx
push eax
mov ecx, edi
call fcn.0040ccb0
pop edi
pop esi
pop ebx
pop ecx
pop ebp
ret 8
Function at 0x40ccb0
Capabilities:
Connect socket
Get socket status
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x13c
mov eax, dword [0x438170]
xor eax, ebp
mov dword [ebp - 4], eax
cmp dword [ebp + 8], 0
push ebx
push esi
push edi
mov ebx, ecx
je 0x40ceaf
call fcn.0040cf90
mov edi, eax
test edi, edi
je 0x40ceaf
mov esi, dword [sym.imp.WS2_32.dll_closesocket]
jmp 0x40ccf0
push 0x2800
push 0x185
push edi
mov ecx, ebx
call fcn.0040d040
test eax, eax
js 0x40ceaf
lea eax, [ebp - 0x124]
push eax
push 0x8004667e
push edi
mov dword [ebp - 0x124], 1
call dword [sym.imp.WS2_32.dll_ioctlsocket]
test eax, eax
js 0x40ce9c
push dword [ebp + 0xc]
mov eax, 2
mov word [ebp - 0x14], ax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x10], eax
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x12], ax
push 0x10
lea eax, [ebp - 0x14]
push eax
push edi
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x40ce2a
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x130], eax
cmp eax, 0x2740
jne 0x40cd8d
push edi
call esi
mov ecx, ebx
call fcn.0040cf90
mov edi, eax
test edi, edi
jne 0x40ccf0
jmp 0x40ceaf
cmp eax, 0x2733
je 0x40cda5
push edi
call esi
mov eax, dword [ebp - 0x130]
mov dword [ebx + 4], eax
jmp 0x40ceaf
lea eax, [ebp - 0x138]
push eax
push 0
lea eax, [ebp - 0x120]
push eax
push 0
mov dword [ebp - 0x134], 0
push edi
mov dword [ebp - 0x138], 0
mov dword [ebp - 0x134], 0x989680
mov dword [ebp - 0x11c], edi
mov dword [ebp - 0x120], 1
call dword [sym.imp.WS2_32.dll_select]
test eax, eax
js 0x40ce9c
lea eax, [ebp - 0x12c]
push eax
lea eax, [ebp - 0x124]
push eax
push 0x1007
push 0xffff
push edi
mov dword [ebp - 0x12c], 4
call dword [sym.imp.WS2_32.dll_getsockopt]
test eax, eax
js 0x40ce9c
cmp dword [ebp - 0x124], 0
jne 0x40ce9c
lea eax, [ebp - 0x124]
push eax
push 0x8004667e
push edi
mov dword [ebp - 0x124], 0
call dword [sym.imp.WS2_32.dll_ioctlsocket]
test eax, eax
js 0x40ce9c
push 4
lea eax, [ebp - 0x128]
push eax
push 0x80
push 0xffff
push edi
mov dword [ebp - 0x128], 0x1e0001
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
je 0x40ce81
call dword [sym.imp.KERNEL32.dll_GetLastError]
push edi
mov dword [ebx + 4], eax
call esi
jmp 0x40ceaf
mov dword [ebx + 0x10c], edi
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004144c7
mov esp, ebp
pop ebp
ret 8
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
mov eax, dword [sym.imp.WS2_32.dll_closesocket]
push edi
call eax
mov dword [ebx + 4], esi
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
xor eax, eax
pop ebx
call fcn.004144c7
mov esp, ebp
pop ebp
ret 8