joyce8/EMBER2024-capa huggingface dataset:
Function at 0x403fda
Capabilities:
Accept command line arguments
Create process on windows

Disassembly:
push 4
mov eax, 0x43861b
call fcn.00420ef7
xor esi, esi
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
push eax
lea eax, [ebp - 0x10]
push eax
call fcn.00404594
push 0x43c088
lea eax, [ebp - 0x10]
push eax
mov dword [ebp - 4], esi
call fcn.004044af
push 5
push esi
push dword [ebp - 0x10]
push dword [ebp + 8]
push str.open
push esi
call dword [sym.imp.SHELL32.dll_ShellExecuteW]
cmp eax, 0x20
jle 0x404024
inc esi
mov eax, dword [ebp - 0x10]
add eax, 0xfffffff0
call fcn.0040394d
mov eax, esi
call fcn.00420f96
ret

Function at 0x4041a5
Capabilities:
Query service status

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
push edi
xor edi, edi
push closesocket
push edi
push edi
mov dword [ebp - 4], edi
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
cmp eax, edi
mov dword [ebp - 8], eax
je 0x404214
push ebx
push esi
push 4
push str.kxescore
push eax
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov ebx, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov esi, eax
cmp esi, edi
je 0x40420d
push 6
mov dword [ebp - 0x24], edi
pop ecx
xor eax, eax
lea edi, [ebp - 0x20]
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x24]
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x40420a
cmp dword [ebp - 0x20], 4
jne 0x40420a
mov dword [ebp - 4], 1
push esi
call ebx
push dword [ebp - 8]
call ebx
pop esi
pop ebx
mov eax, dword [ebp - 4]
pop edi
leave
ret

Function at 0x4042ae
Capabilities:
Enumerate processes

Disassembly:
push ebp
lea ebp, [esp - 0x1b0]
sub esp, 0x230
mov eax, dword [0x444044]
xor eax, ebp
mov dword [ebp + 0x1ac], eax
push esi
push edi
xor esi, esi
push 0x228
lea eax, [ebp - 0x7c]
push esi
push eax
mov dword [ebp - 0x80], esi
call fcn.0041e790
add esp, 0xc
push esi
push 2
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
mov edi, eax
cmp edi, 0xffffffff
je 0x40433d
lea eax, [ebp - 0x80]
push eax
push edi
mov dword [ebp - 0x80], 0x22c
call sub.KERNEL32.dll_Process32FirstW
jmp 0x40432d
cmp dword [ebp - 0x78], esi
je 0x404323
cmp dword [ebp - 0x78], 4
je 0x404323
lea eax, [ebp - 0x5c]
push str.kxetray.exe
push eax
call fcn.0041e92f
test eax, eax
pop ecx
pop ecx
je 0x404333
lea eax, [ebp - 0x80]
push eax
push edi
call sub.KERNEL32.dll_Process32NextW
test eax, eax
jne 0x404304
jmp 0x404336
xor esi, esi
inc esi
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp + 0x1ac]
pop edi
mov eax, esi
xor ecx, ebp
pop esi
call fcn.0041e1a0
add ebp, 0x1b0
leave
ret
Function at 0x404671
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push esi
push dword [esp + 0xc]
mov esi, eax
push dword [esp + 0xc]
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
jne 0x404688
pop esi
ret
push edi
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
test edi, edi
je 0x4046bd
push dword [esp + 0x10]
push dword [esp + 0x10]
call dword [sym.imp.KERNEL32.dll_SizeofResource]
add eax, edi
and esi, 0xf
jbe 0x4046b9
cmp edi, eax
jae 0x4046bd
dec esi
movzx ecx, word [edi]
lea edi, [edi + ecx*2 + 2]
jne 0x4046ab
cmp edi, eax
jb 0x4046c1
xor eax, eax
jmp 0x4046cb
mov ax, word [edi]
neg ax
sbb eax, eax
and eax, edi
pop edi
pop esi
ret
Function at 0x404899
Capabilities:
Read .ini file

Disassembly:
push ebp
sub esp, 0xc8
lea ebp, [esp - 4]
mov eax, dword [0x444044]
xor eax, ebp
mov dword [ebp + 0xc8], eax
push 0x14
mov eax, 0x4388da
call fcn.00420ef7
mov eax, dword [0x445774]
mov edi, 0x445774
xor esi, esi
mov ecx, edi
mov dword [ebp - 0x20], esi
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x14], eax
push 0xc6
lea eax, [ebp + 2]
push esi
mov dword [ebp - 4], esi
push eax
mov word [ebp], si
call fcn.0041e790
mov eax, dword [0x445774]
add esp, 0xc
mov ecx, edi
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x18], eax
mov byte [ebp - 4], 1
mov eax, dword [0x445774]
mov ecx, edi
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x10], eax
push esi
lea ebx, [ebp - 0x1c]
mov byte [ebp - 4], 2
call fcn.00404037
pop ecx
lea edi, [ebp - 0x14]
mov byte [ebp - 4], 3
call fcn.00401a6c
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x1c]
add eax, 0xfffffff0
call fcn.0040394d
mov eax, edi
call fcn.00401ad7
push str.ressrcchskismain.ini
mov eax, edi
push eax
call fcn.004044af
push dword [ebp - 0x14]
mov ebx, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
push 0x64
lea eax, [ebp]
push eax
mov esi, 0x43bf9c
push esi
push str.Version
push str.DisplayVersions
call ebx
test eax, eax
je 0x404a37
lea eax, [ebp]
push eax
lea eax, [ebp - 0x10]
push eax
call fcn.00403ab2
lea eax, [ebp - 0x10]
call fcn.00401ad7
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax - 0xc]
lea eax, [ebp - 0x1c]
push eax
push 2
pop edx
lea eax, [ebp - 0x10]
call fcn.00401b00
lea edi, [ebp - 0x18]
mov byte [ebp - 4], 4
call fcn.00401a6c
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x1c]
add eax, 0xfffffff0
call fcn.0040394d
push 0x43c1ec
mov eax, edi
push eax
call fcn.00404cd3
push 0x43c1f0
mov eax, edi
push eax
call fcn.00404cd3
push dword [ebp - 0x14]
lea eax, [ebp]
push 0x64
push eax
push esi
push 0x43b450
push str.infos
call ebx
test eax, eax
je 0x404a37
lea eax, [ebp]
push eax
lea eax, [ebp - 0x10]
push eax
call fcn.00403ab2
lea eax, [ebp - 0x1c]
push eax
push 6
pop ecx
lea eax, [ebp - 0x10]
call fcn.00404423
mov byte [ebp - 4], 5
mov eax, dword [eax]
push dword [eax - 0xc]
push eax
mov eax, edi
call fcn.00404543
mov eax, dword [ebp - 0x1c]
add eax, 0xfffffff0
call fcn.0040394d
push dword [ebp - 0x18]
call fcn.0041e81b
pop ecx
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x10]
add eax, 0xfffffff0
call fcn.0040394d
mov eax, dword [ebp - 0x18]
add eax, 0xfffffff0
call fcn.0040394d
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
call fcn.0040394d
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0xc8]
xor ecx, ebp
call fcn.0041e1a0
add ebp, 0xcc
leave
ret
Function at 0x404a7e
Capabilities:
Read .ini file

Disassembly:
push 0xc
mov eax, 0x438885
call fcn.00420f60
mov eax, dword [0x445774]
mov ecx, 0x445774
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x14], eax
and dword [ebp - 4], 0
push 0x400000
lea ebx, [ebp - 0x18]
call fcn.00404037
pop ecx
lea edi, [ebp - 0x14]
mov byte [ebp - 4], 1
call fcn.00401a6c
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x18]
add eax, 0xfffffff0
call fcn.0040394d
mov eax, edi
call fcn.00401ad7
push str.ressrcchsuplive.svr
mov eax, edi
push eax
call fcn.004044af
mov esi, dword [ebp - 0x14]
push esi
push 0xffffffffffffffff
push str.TryNo
push str.common
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
mov edi, eax
lea eax, [esi - 0x10]
call fcn.0040394d
mov eax, edi
call fcn.00420faa
ret

Function at 0x405144
Capabilities:
Check mutex on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x438e8a
mov eax, dword fs:[0]
push eax
sub esp, 0x14
push esi
push edi
mov eax, dword [0x444044]
xor eax, esp
push eax
lea eax, [esp + 0x20]
mov dword fs:[0], eax
mov eax, dword [0x445774]
mov ecx, 0x445774
xor esi, esi
call dword [eax + 0xc]
add eax, 0x10
mov dword [esp + 0x10], eax
mov dword [esp + 0x28], esi
lea edi, [esp + 0x18]
mov dword [esp + 0x14], 1
call fcn.00403d01
lea edi, [esp + 0x10]
mov byte [esp + 0x28], 1
call fcn.00401a6c
mov byte [esp + 0x28], 0
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
call fcn.0040394d
push str.KAutofixF0BD080B_1821_42dc_A2F1_6323C0BDA90D
push 1
push esi
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
test eax, eax
mov dword [esp + 0x18], eax
je 0x405213
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x4051e1
push 4
pop esi
jmp 0x405213
lea edi, [esp + 0x14]
call fcn.004010ea
mov esi, eax
test esi, esi
jne 0x4051fa
mov eax, edi
push eax
call fcn.004011e2
mov esi, eax
cmp esi, 1
jne 0x405213
push dword [esp + 0x18]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [esp + 0x10]
call fcn.00403fda
pop ecx
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
call fcn.0040394d
mov eax, esi
mov ecx, dword [esp + 0x20]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret 0x10

Function at 0x405847
Capabilities:
Write file on windows

Disassembly:
push esi
mov esi, ecx
mov eax, dword [esi + 8]
test eax, eax
push edi
mov edi, dword [esp + 0x10]
je 0x405866
push eax
push edi
push 1
push dword [esp + 0x18]
call fcn.0041fe19
add esp, 0x10
add dword [esi + 4], edi
pop edi
xor eax, eax
pop esi
ret 8
Function at 0x40706b
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
and dword [ebp + 8], 0
and dword [ebp - 4], 0
cmp dword [ebp + 0xc], 0
jne 0x407088
mov eax, dword [ebp - 4]
jmp 0x407162
mov esi, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x10]
mov eax, dword [ebp + 8]
shr ecx, 3
xor eax, 0xffffffff
test ecx, ecx
je 0x40713d
push ebp
mov ebp, ecx
xor edx, edx
xor ecx, ecx
nop
mov ebx, dword [esi]
add esi, 4
mov dl, bl
mov cl, bh
xor dl, al
shr eax, 8
mov edi, dword [edx*4 + 0x43ba90]
shr ebx, 0x10
xor eax, edi
xor cl, al
shr eax, 8
mov edi, dword [ecx*4 + 0x43ba90]
mov dl, bl
xor eax, edi
xor dl, al
shr eax, 8
mov edi, dword [edx*4 + 0x43ba90]
mov cl, bh
xor eax, edi
mov ebx, dword [esi]
xor cl, al
shr eax, 8
mov edi, dword [ecx*4 + 0x43ba90]
add esi, 4
xor eax, edi
mov dl, bl
mov cl, bh
xor dl, al
shr eax, 8
mov edi, dword [edx*4 + 0x43ba90]
shr ebx, 0x10
xor eax, edi
xor cl, al
shr eax, 8
mov edi, dword [ecx*4 + 0x43ba90]
mov dl, bl
xor eax, edi
xor dl, al
shr eax, 8
mov edi, dword [edx*4 + 0x43ba90]
mov cl, bh
xor eax, edi
xor cl, al
shr eax, 8
xor eax, dword [ecx*4 + 0x43ba90]
dec ebp
jne 0x4070a7
pop ebp
mov ecx, dword [ebp + 0x10]
xor edx, edx
and ecx, 7
je 0x407159
mov dl, byte [esi]
inc esi
xor dl, al
shr eax, 8
xor eax, dword [edx*4 + 0x43ba90]
dec ecx
jne 0x407147
xor eax, 0xffffffff
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
leave
ret

Function at 0x4078bb
Capabilities:
Write file on windows

Disassembly:
push 0x14
mov eax, 0x4384f9
call fcn.00420ef7
mov ebx, ecx
mov eax, dword [0x445774]
xor esi, esi
mov ecx, 0x445774
mov dword [ebp - 0x1c], esi
call dword [eax + 0xc]
lea edi, [eax + 0x10]
mov dword [ebp - 0x10], edi
push esi
push 0x80
push 2
push esi
push 1
mov dword [ebp - 4], esi
mov eax, dword [ebx + 0x14]
push 0x40000000
push eax
mov dword [ebp - 0x18], esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
mov dword [ebp - 0x14], eax
je 0x407980
cmp dword [ebx + 0x18], esi
jne 0x407933
mov eax, dword [ebp + 8]
push dword [eax]
lea eax, [ebp - 0x10]
call fcn.004079ed
mov edi, dword [ebp - 0x10]
mov eax, dword [edi - 0xc]
push esi
lea ecx, [ebp - 0x18]
push ecx
push eax
push edi
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x40796c
mov ebx, dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
lea ecx, [ebp - 0x20]
push ecx
push 2
lea ecx, [ebp - 0x10]
push ecx
push eax
mov byte [ebp - 0x10], 0xff
mov byte [ebp - 0xf], 0xfe
mov dword [ebp - 0x20], esi
call ebx
test eax, eax
je 0x407977
mov eax, dword [ebp + 8]
mov eax, dword [eax]
mov ecx, dword [eax - 0xc]
push esi
lea edx, [ebp - 0x18]
push edx
add ecx, ecx
push ecx
push eax
push dword [ebp - 0x14]
call ebx
test eax, eax
je 0x407977
mov dword [ebp - 0x1c], 1
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [edi - 0x10]
call fcn.0040394d
mov eax, dword [ebp - 0x1c]
call fcn.00420f96
ret 4
Function at 0x4085d5
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
xor ebx, ebx
push ebx
push ebx
push 3
push ebx
push 1
push closesocket
push dword [ebp + 8]
mov dword [ebp - 0xc], ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
mov dword [ebp - 8], eax
je 0x40866d
push edi
lea ecx, [ebp - 4]
push ecx
push eax
mov dword [ebp - 4], ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp dword [ebp - 4], ebx
mov edi, eax
jne 0x408663
cmp edi, 0x200000
ja 0x408663
lea eax, [edi + 2]
push esi
push eax
call fcn.0041e118
pop ecx
push ebx
mov esi, eax
lea eax, [ebp + 8]
push eax
push edi
push esi
push dword [ebp - 8]
mov dword [ebp + 8], ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x408662
mov eax, dword [ebp + 8]
cmp eax, edi
jne 0x408662
mov byte [eax + esi], bl
mov eax, dword [ebp + 8]
mov byte [eax + esi + 1], bl
mov eax, dword [ebp + 0xc]
mov dword [eax], esi
mov eax, dword [ebp + 0x10]
mov dword [eax], edi
mov dword [ebp - 0xc], 1
pop esi
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
mov eax, dword [ebp - 0xc]
pop ebx
leave
ret 0xc

Function at 0x408fdc
Capabilities:
Hash data with md5

Disassembly:
push esi
xor ecx, ecx
push 0x40
lea esi, [eax + 0x58]
push ecx
push esi
mov dword [eax + 0x14], ecx
mov dword [eax + 0x10], ecx
mov dword [eax], 0x67452301
mov dword [eax + 4], 0xefcdab89
mov dword [eax + 8], 0x98badcfe
mov dword [eax + 0xc], 0x10325476
call fcn.0041e790
add esp, 0xc
mov byte [esi], 0x80
pop esi
ret

Function at 0x409815
Capabilities:
Read file on windows

Disassembly:
push ebx
push esi
xor esi, esi
cmp dword [edi + 0x58], esi
jne 0x409845
push 0x98
call fcn.0041feb4
mov ebx, eax
cmp ebx, esi
pop ecx
je 0x409838
call fcn.00408fdc
mov eax, ebx
jmp 0x40983a
xor eax, eax
cmp eax, esi
mov dword [edi + 0x58], eax
jne 0x409845
xor eax, eax
jmp 0x4098ba
push ebp
push 0x43c864
push dword [esp + 0x14]
call fcn.0041fb69
mov ebp, eax
cmp ebp, esi
pop ecx
pop ecx
jne 0x409860
xor eax, eax
jmp 0x4098b9
cmp dword [edi + 0x5c], esi
mov ebx, 0xff
jne 0x409874
push ebx
call fcn.0041e118
pop ecx
mov dword [edi + 0x5c], eax
push ebp
push ebx
push 1
push dword [edi + 0x5c]
call fcn.0042067d
add esp, 0x10
cmp eax, esi
je 0x4098a5
push dword [edi + 0x5c]
mov esi, dword [edi + 0x58]
call fcn.00409014
push ebp
push ebx
push 1
push dword [edi + 0x5c]
call fcn.0042067d
add esp, 0x10
test eax, eax
jne 0x409887
push ebp
call fcn.0041fc3e
pop ecx
mov ecx, dword [edi + 0x58]
lea ebx, [edi + 4]
call fcn.004090ab
mov eax, ebx
pop ebp
pop esi
pop ebx
ret 4

Function at 0x4098bf
Capabilities:
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x198
mov eax, dword [0x444044]
xor eax, ebp
mov dword [ebp - 4], eax
lea eax, [ebp - 0x198]
push eax
push 0x101
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
jne 0x409900
cmp byte [ebp - 0x198], 1
jne 0x4098fa
cmp byte [ebp - 0x197], 1
je 0x409903
call dword [sym.imp.WS2_32.dll_WSACleanup]
push 2
pop eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041e1a0
leave
ret
Function at 0x4099b1
Capabilities:
Resolve function by parsing pe exports

Disassembly:
test edx, edx
jne 0x4099b9
push 0x2b
pop eax
ret
mov eax, dword [esp + 4]
lea ecx, [esp + 8]
jmp fcn.0040d2e7

Function at 0x409d6a
Capabilities:
Write file on windows

Disassembly:
mov eax, dword [esi + 0x88]
test eax, eax
je 0x409d87
push dword [esi + 0x14]
push dword [esp + 0xc]
push dword [esp + 0xc]
push ecx
push esi
call eax
add esp, 0x14
ret
test ecx, ecx
jl 0x409db8
cmp ecx, 2
jg 0x409db8
push dword [esi + 0x10]
push 1
push 2
push dword [ecx*4 + 0x43ba70]
call fcn.0041fe19
push dword [esi + 0x10]
push 1
push dword [esp + 0x20]
push dword [esp + 0x20]
call fcn.0041fe19
add esp, 0x20
xor eax, eax
ret
Function at 0x4104f9
Capabilities:
Encode data using xor
Hash data using djb2

Disassembly:
lea edx, [ecx + eax]
cmp ecx, edx
mov eax, 0x1505
jae 0x410514
push esi
movsx esi, byte [ecx]
imul eax, eax, 0x21
xor eax, esi
inc ecx
cmp ecx, edx
jb 0x410506
pop esi
ret

Function at 0x4117b8
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x128
mov eax, dword [0x444044]
xor eax, ebp
mov dword [ebp - 8], eax
push ebx
push esi
push edi
mov edi, ecx
mov esi, dword [edi]
push dword [esi + 0x74]
mov dword [ebp - 0x124], edi
call fcn.0041f820
pop ecx
mov ecx, 0xff
cmp eax, ecx
jae 0x41191b
and dword [ebp - 0x120], 0
push ecx
lea eax, [ebp - 0x10b]
push 0
push eax
mov byte [ebp - 0x10c], 0
call fcn.0041e790
mov ebx, dword [sym.imp.WS2_32.dll_inet_addr]
add esp, 0xc
push dword [esi + 0x74]
call ebx
lea eax, [ebp - 0x120]
push eax
push 0
push dword [esi + 0x74]
push edi
call fcn.0041034c
add esp, 0x10
cmp eax, 1
jne 0x411842
lea eax, [ebp - 0x120]
push eax
push edi
call fcn.00415c2f
pop ecx
pop ecx
mov edi, dword [ebp - 0x120]
test edi, edi
je 0x41185d
push dword [esi + 0x74]
lea eax, [ebp - 0x10c]
push eax
call fcn.004201f0
pop ecx
pop ecx
cmp byte [ebp - 0x10c], 0
jne 0x411873
push dword [esi + 0x74]
push str.Couldnt_bind_to__s
jmp 0x411914
lea eax, [ebp - 0x10c]
push eax
push str.We_bind_local_end_to__s_n
call fcn.00409aa3
pop ecx
pop ecx
lea eax, [ebp - 0x10c]
push eax
call ebx
cmp eax, 0xffffffff
je 0x411908
test edi, edi
je 0x411908
mov ebx, dword [edi]
call fcn.00410498
push dword [ebx + 0x10]
push dword [ebx + 0x14]
push dword [ebp + 8]
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
jl 0x4118e3
lea eax, [ebp - 0x128]
push eax
lea eax, [ebp - 0x11c]
push eax
push dword [ebp + 8]
mov dword [ebp - 0x128], 0x10
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jge 0x411904
push str.getsockname___failed
call fcn.00409b0c
jmp 0x41191a
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0x8318], eax
mov ebx, eax
mov eax, dword [ebp - 0x124]
call fcn.004120f8
push eax
push str.bind_failure:__s
jmp 0x411914
xor eax, eax
jmp 0x41191e
lea eax, [ebp - 0x10c]
push eax
push str.couldnt_find_my_own_IP_address___s_
call fcn.00409b0c
pop ecx
pop ecx
push 0x2d
pop eax
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0041e1a0
leave
ret
Function at 0x411a4c
Capabilities:
Connect socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x9c
mov eax, dword [0x444044]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 0xc]
push edi
mov ebx, edx
push dword [ebx + 0xc]
mov edi, ecx
push dword [edi + 0x28]
mov eax, dword [edi]
push dword [ebx + 4]
mov dword [ebp - 0x98], edi
mov dword [ebp - 0x9c], esi
mov dword [ebp - 0x90], eax
call dword [sym.imp.WS2_32.dll_socket]
cmp eax, 0xffffffff
mov dword [ebp - 0x8c], eax
je 0x411c30
lea eax, [ebp - 0x88]
push 0x80
push eax
mov ecx, ebx
mov byte [esi], 0
call fcn.0041022d
mov esi, dword [ebp - 0x90]
lea eax, [ebp - 0x88]
push eax
push str.__Trying__s...
call fcn.00409aa3
mov eax, esi
add esp, 0x10
cmp byte [eax + 0x1b6], 0
je 0x411ae2
push dword [ebp - 0x8c]
call fcn.004119f6
pop ecx
mov eax, dword [edi]
cmp dword [eax + 0x74], 0
je 0x411b00
push dword [ebp - 0x8c]
mov ecx, edi
call fcn.004117b8
test eax, eax
pop ecx
jne 0x411c24
push dword [ebp - 0x8c]
xor eax, eax
inc eax
call fcn.0041177e
cmp dword [edi + 0x28], 1
pop ecx
jne 0x411b2b
push dword [ebx + 0x10]
push dword [ebx + 0x14]
push dword [ebp - 0x8c]
call dword [sym.imp.WS2_32.dll_connect]
mov edi, eax
jmp 0x411b2d
xor edi, edi
cmp edi, 0xffffffff
jne 0x411bc5
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
cmp ebx, 0xb
mov dword [ebp - 0x94], ebx
je 0x411bb5
cmp ebx, 0x2732
jle 0x411b59
cmp ebx, 0x2734
jle 0x411bb5
mov eax, dword [ebp - 0x98]
call fcn.004120f8
push eax
lea eax, [ebp - 0x88]
push eax
push str.Failed_to_connect_to__s:__s
call fcn.00409b0c
add esp, 0xc
mov dword [esi + 0x8318], ebx
push dword [ebp - 0x8c]
lea esi, [ebp - 0x94]
call fcn.0041192d
test edi, edi
pop ecx
jne 0x411bdd
test al, al
je 0x411bf4
mov eax, dword [ebp - 0x9c]
mov esi, dword [ebp - 0x90]
push str.connected_n
mov byte [eax], 1
call fcn.00409aa3
pop ecx
jmp 0x411bd5
mov eax, dword [ebp + 8]
mov edi, dword [ebp - 0x8c]
call fcn.00411799
mov edi, eax
cmp edi, 1
jne 0x411b7f
mov eax, esi
cmp dword [eax + 0x2d8], 2
jne 0x411b7f
mov eax, dword [ebp - 0x8c]
jmp 0x411c33
cmp edi, 1
jne 0x411bf4
mov esi, dword [ebp - 0x90]
push str.Timeout_n
call fcn.00409aa3
jmp 0x411c23
mov ebx, dword [ebp - 0x94]
mov eax, dword [ebp - 0x90]
mov dword [eax + 0x8318], ebx
mov eax, dword [ebp - 0x98]
call fcn.004120f8
mov esi, dword [ebp - 0x90]
push eax
push 0x43d138
call fcn.00409aa3
pop ecx
pop ecx
push dword [ebp - 0x8c]
call dword [sym.imp.WS2_32.dll_closesocket]
or eax, 0xffffffff
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0041e1a0
leave
ret
Function at 0x41331a
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x324
cdq
mov ecx, 0x3e8
idiv ecx
push ebx
push esi
xor esi, esi
or ecx, 0xffffffff
mov dword [ebp - 0x114], esi
mov dword [ebp - 0x21c], esi
imul edx, edx, 0x3e8
mov dword [ebp - 8], edx
xor edx, edx
mov dword [ebp - 0xc], eax
mov eax, dword [ebp + 8]
inc edx
cmp eax, 0xffffffff
je 0x41336f
mov dword [ebp - 0x218], eax
mov dword [ebp - 0x21c], edx
mov dword [ebp - 0x110], eax
mov dword [ebp - 0x114], edx
mov ecx, eax
cmp edi, 0xffffffff
mov dword [ebp - 0x324], esi
je 0x4133c6
xor eax, eax
cmp dword [ebp - 0x114], esi
mov dword [ebp - 0x320], edi
mov dword [ebp - 0x324], edx
jbe 0x4133a2
cmp dword [ebp + eax*4 - 0x110], edi
je 0x4133a2
inc eax
cmp eax, dword [ebp - 0x114]
jb 0x413390
cmp eax, dword [ebp - 0x114]
jne 0x4133c0
cmp dword [ebp - 0x114], 0x40
jae 0x4133c0
mov dword [ebp + eax*4 - 0x110], edi
inc dword [ebp - 0x114]
cmp edi, ecx
jbe 0x4133c6
mov ecx, edi
lea ebx, [ecx + 1]
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x114]
push eax
lea eax, [ebp - 0x324]
push eax
lea eax, [ebp - 0x21c]
push eax
push ebx
call dword [sym.imp.WS2_32.dll_select]
mov esi, eax
cmp esi, 0xffffffff
jne 0x4133fb
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 4
je 0x4133c9
test esi, esi
jge 0x413404
or eax, 0xffffffff
jmp 0x41346b
jne 0x41340a
xor eax, eax
jmp 0x41346b
xor esi, esi
cmp dword [ebp + 8], 0xffffffff
je 0x41343c
lea eax, [ebp - 0x21c]
push eax
push dword [ebp + 8]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x413426
inc esi
lea eax, [ebp - 0x114]
push eax
push dword [ebp + 8]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x41343c
or esi, 4
cmp edi, 0xffffffff
je 0x413469
lea eax, [ebp - 0x324]
push eax
push edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x413455
or esi, 2
lea eax, [ebp - 0x114]
push eax
push edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x413469
or esi, 4
mov eax, esi
pop esi
pop ebx
leave
ret