joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4723b0
Capabilities:
Check for software breakpoints

Disassembly:
push esi
mov esi, dword [esp + 8]
cmp dword [esi + 0x10], 0xca
jne 0x4723e3
push esi
call fcn.00480770
mov eax, dword [esi + 0x40]
add esp, 4
test eax, eax
je 0x4723dc
mov dword [esi + 0x10], 0xcf
mov eax, 1
pop esi
ret
mov dword [esi + 0x10], 0xcb
mov eax, dword [esi + 0x10]
cmp eax, 0xcb
jne 0x472469
mov eax, dword [esi + 0x1b0]
mov ecx, dword [eax + 0x10]
test ecx, ecx
je 0x472452
mov eax, dword [esi + 8]
test eax, eax
je 0x472407
push esi
call dword [eax]
add esp, 4
mov ecx, dword [esi + 0x1b0]
push esi
call dword [ecx]
add esp, 4
test eax, eax
je 0x47244e
cmp eax, 2
je 0x472452
mov ecx, dword [esi + 8]
test ecx, ecx
je 0x4723fa
cmp eax, 3
je 0x47242d
cmp eax, 1
jne 0x4723fa
mov eax, dword [ecx + 4]
inc eax
mov dword [ecx + 4], eax
mov eax, dword [esi + 8]
mov ecx, dword [eax + 8]
mov edx, dword [eax + 4]
cmp edx, ecx
jl 0x4723fa
mov edx, dword [esi + 0x13c]
add edx, ecx
mov dword [eax + 8], edx
jmp 0x4723fa
xor eax, eax
pop esi
ret
mov eax, dword [esi + 0x90]
push esi
mov dword [esi + 0x98], eax
call fcn.00472490
add esp, 4
pop esi
ret
cmp eax, 0xcc
je 0x472478
mov ecx, dword [esi]
push esi
call dword [ecx]
add esp, 4
push esi
call fcn.00472490
add esp, 4
pop esi
ret

Function at 0x472d00
Capabilities:
Terminate process

Disassembly:
mov eax, dword [esp + 4]
test eax, eax
je 0x472d21
mov ecx, dword [eax + 0x40]
test ecx, ecx
je 0x472d21
mov eax, dword [eax + 0x44]
test eax, eax
je 0x472d21
mov edx, dword [esp + 8]
push edx
push eax
call ecx
add esp, 8
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]

Function at 0x48d960
Capabilities:
Capture webcam image

Disassembly:
mov eax, dword [esp + 8]
push ebx
push esi
mov esi, ecx
mov eax, dword [eax + 4]
cmp dword [esi + 0xec], 1
jne 0x48da03
test eax, eax
jbe 0x48da03
mov ecx, dword [esi + 0xbc]
test ecx, ecx
jle 0x48da03
mov ecx, dword [esi + 0x1c]
push edi
push 0
push eax
push 0x419
push ecx
call dword [sym.imp.USER32.dll_SendMessageA]
mov edi, eax
mov eax, dword [esi + 0xbc]
inc edi
test eax, eax
jne 0x48d9ae
xor esi, esi
jmp 0x48d9b4
mov esi, dword [esi + 0xb4]
add esi, 4
xor ebx, ebx
test edi, edi
jbe 0x48d9df
push ebp
mov ebp, edi
add esi, 6
push esi
call fcn.00491c40
add esi, eax
push esi
mov ebx, esi
call fcn.00491c40
add esp, 8
add esi, eax
dec edi
dec ebp
jne 0x48d9c0
pop ebp
test edi, edi
pop edi
jne 0x48da03
test ebx, ebx
je 0x48da03
mov edx, dword [esp + 0x10]
push 0x4e
add edx, 0x10
push ebx
push edx
call fcn.004b8e60
add esp, 0xc
mov eax, 1
pop esi
pop ebx
ret 0xc
pop esi
xor eax, eax
pop ebx
ret 0xc
Function at 0x48db25
Capabilities:
Capture webcam image

Disassembly:
sub esp, 0x44
push ebx
push ebp
push esi
mov esi, ecx
push edi
mov eax, dword [esi + 0x3c]
test eax, eax
je 0x48dc3d
push eax
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x48dc3d
mov eax, dword [esi + 0x3c]
push eax
call fcn.004ca783
mov esi, eax
test esi, esi
je 0x48dc3d
mov ebx, dword [esp + 0x58]
mov ecx, dword [esi + 0x1c]
mov ebp, dword [sym.imp.USER32.dll_SendMessageA]
push 0
push ebx
push 0x419
push ecx
call ebp
mov edi, eax
test edi, edi
jl 0x48dc3d
mov ecx, esi
call fcn.0048dab0
cmp edi, eax
jge 0x48dc3d
mov eax, dword [esi + 0xc4]
mov edx, dword [esi + 0xc0]
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x5c]
xor ecx, ecx
mov dword [esp + 0x28], edx
cmp eax, ecx
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], ecx
mov dword [esp + 0x4c], ecx
mov dword [esp + 0x50], ecx
mov dword [esp + 0x38], edi
jne 0x48dbc3
mov dword [esp + 0x34], 1
jmp 0x48dc1e
mov edx, dword [esi + 0x1c]
lea ecx, [esp + 0x18]
push ecx
push ebx
push 0x433
push edx
call ebp
test eax, eax
je 0x48dc3d
mov eax, dword [esp + 0x60]
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x24]
mov dword [esp + 0x10], ecx
mov dword [eax], 0
mov ecx, dword [esi + 0x1c]
lea eax, [esp + 0x10]
add edx, 2
push eax
push ecx
mov dword [esp + 0x1c], edx
call dword [sym.imp.USER32.dll_ClientToScreen]
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x14]
mov dword [esp + 0x34], 3
mov dword [esp + 0x3c], edx
mov dword [esp + 0x40], eax
xor ecx, ecx
push ecx
lea ecx, [esp + 0x2c]
push ecx
push 0x7d8
call fcn.0048d060
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x44
ret 0xc
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x44
ret 0xc

Function at 0x497b20
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ecx
mov eax, dword [0x60539c]
xor edx, edx
cmp eax, edx
jne 0x497b46
xor eax, eax
mov byte [eax + 0x60529c], al
inc eax
cmp eax, 0x100
jl 0x497b2e
mov dword [0x60539c], 1
mov eax, dword [esp + 0xc]
push ebx
mov ebx, dword [esp + 0x14]
push esi
push edi
mov ecx, 0x40
mov esi, 0x60529c
mov edi, ebx
rep movsd dword es:[edi], dword [esi]
cmp eax, edx
mov byte [ebx + 0x100], dl
mov byte [ebx + 0x101], dl
jle 0x497bd7
xor esi, esi
push ebp
mov byte [esp + 0x20], dl
xor ecx, ecx
mov edi, dword [esp + 0x20]
mov ebp, dword [esp + 0x18]
mov al, byte [esi + ebx]
and edi, 0xff
xor edx, edx
mov dl, byte [edi + ebp]
mov ebp, eax
and ebp, 0xff
add ecx, edx
add ecx, ebp
and ecx, 0x800000ff
jns 0x497baa
dec ecx
or ecx, 0xffffff00
inc ecx
mov byte [esp + 0x10], cl
mov ecx, dword [esp + 0x10]
and ecx, 0xff
mov dl, byte [ecx + ebx]
mov byte [esi + ebx], dl
mov byte [ecx + ebx], al
lea eax, [edi + 1]
cdq
idiv dword [esp + 0x1c]
inc esi
cmp esi, 0x100
mov byte [esp + 0x20], dl
jl 0x497b78
pop ebp
pop edi
pop esi
pop ebx
pop ecx
ret
Function at 0x497be0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
mov eax, dword [ebp + 0x10]
push ebx
push esi
push edi
mov cl, byte [eax + 0x100]
mov dl, byte [eax + 0x101]
mov dword [ebp - 8], eax
mov byte [ebp - 1], cl
mov byte [ebp - 2], dl
xor ebx, ebx
mov bl, byte [ebp - 1]
xor edx, edx
mov dl, byte [ebp - 2]
mov esi, dword [ebp - 8]
mov edi, dword [ebp + 8]
xor eax, eax
mov ecx, dword [ebp + 0xc]
test ecx, ecx
jle 0x497c33
inc bl
mov al, byte [esi + ebx]
add dl, al
xchg byte [esi + edx], al
mov byte [esi + ebx], al
add al, byte [esi + edx]
mov al, byte [esi + eax]
xor byte [edi], al
inc edi
dec ecx
jne 0x497c1a
mov byte [ebp - 1], bl
mov byte [ebp - 2], dl
mov eax, dword [ebp + 0x10]
mov cl, byte [ebp - 1]
mov dl, byte [ebp - 2]
pop edi
pop esi
mov byte [eax + 0x100], cl
mov byte [eax + 0x101], dl
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x49e5e0
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x4d827e
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
mov eax, dword [esp + 0x18]
push esi
push edi
mov edi, ecx
mov ecx, dword [esp + 0x1c]
push eax
push ecx
mov ecx, edi
mov dword [esp + 0x10], edi
call fcn.0049ef00
push 0x10
mov dword [esp + 0x18], 0
mov dword [edi], 0x4f33ac
call fcn.004c8a97
mov esi, eax
add esp, 4
mov dword [esp + 0x20], esi
mov al, 1
test esi, esi
mov byte [esp + 0x14], al
je 0x49e673
push 4
mov byte [esi + 8], al
mov dword [esi], 0
mov dword [esi + 4], 0
call fcn.004c8a97
add esp, 4
mov dword [esp + 0x1c], eax
test eax, eax
mov byte [esp + 0x14], 2
je 0x49e66c
push 0
mov ecx, eax
call fcn.00495750
mov dword [esi + 0xc], eax
jmp 0x49e675
xor eax, eax
mov dword [esi + 0xc], eax
jmp 0x49e675
xor esi, esi
mov ecx, dword [esp + 0xc]
mov dword [edi + 0x30], esi
mov dword [edi + 0x34], 0
mov eax, edi
pop edi
pop esi
mov dword fs:[0], ecx
add esp, 0x10
ret 8

Function at 0x4cb127
Capabilities:
Get graphical window text

Disassembly:
push esi
mov esi, ecx
mov ecx, dword [esi + 0x38]
test ecx, ecx
jne 0x4cb15f
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextLengthA]
lea ecx, [eax + 1]
push ecx
mov ecx, dword [esp + 0xc]
push eax
call fcn.004c91b1
push eax
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextA]
mov ecx, dword [esp + 8]
push 0xffffffffffffffff
call fcn.004c9189
jmp 0x4cb16b
mov eax, dword [ecx]
push dword [esp + 8]
call dword [eax + 0x88]
pop esi
ret 4

Function at 0x4cc819
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
push esi
push edi
xor edi, edi
cmp dword [esp + 0x10], edi
mov ebx, ecx
je 0x4cc85b
call fcn.004d2311
mov esi, dword [eax + 0xc]
push 0xf0
push dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
cmp eax, edi
je 0x4cc85b
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, edi
jne 0x4cc852
xor eax, eax
jmp 0x4cc863
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
push edi
mov ecx, ebx
call fcn.004cc869
pop edi
pop esi
pop ebx
ret 4
Function at 0x4d2841
Capabilities:
Get thread local storage value

Disassembly:
push ebx
push esi
mov esi, ecx
lea ebx, [esi + 0x1c]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [esp + 0x10], 0
jne 0x4d286f
push dword [esi]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x4d288d
push dword [esp + 0xc]
mov ecx, esi
push eax
call fcn.004d27a7
jmp 0x4d288d
mov eax, dword [esi + 0x14]
test eax, eax
je 0x4d288d
push edi
push dword [esp + 0x10]
mov edi, dword [eax + 4]
mov ecx, esi
push eax
call fcn.004d27a7
test edi, edi
mov eax, edi
jne 0x4d2877
pop edi
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop esi
pop ebx
ret 8
Function at 0x405e00
Capabilities:
Delete directory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5353bc
mov eax, dword fs:[0]
push eax
push esi
mov eax, dword [0x584cc0]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, dword [ebp + 8]
mov dword [esi], vtable.CMainDlg.0
mov ecx, esi
mov dword [ebp - 4], 9
call fcn.00405fa0
mov eax, dword [esi + 0x394]
push eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
test eax, eax
jne 0x405e51
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov byte [ebp - 4], 8
mov eax, dword [esi + 0x39c]
sub eax, 0x10
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x405e77
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 7
mov eax, dword [esi + 0x398]
sub eax, 0x10
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x405e9d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 6
mov eax, dword [esi + 0x394]
sub eax, 0x10
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x405ec3
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 5
mov eax, dword [esi + 0x390]
sub eax, 0x10
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x405ee9
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [esi + 0x28c]
call fcn.0040c970
lea ecx, [esi + 0x218]
mov byte [ebp - 4], 3
call fcn.004124eb
lea ecx, [esi + 0x1a4]
mov byte [ebp - 4], 2
call fcn.00412496
lea ecx, [esi + 0x130]
mov byte [ebp - 4], 1
call fcn.0041264c
lea ecx, [esi + 0xbc]
mov byte [ebp - 4], 0
call fcn.0041353f
lea ecx, [esi + 0xac]
mov dword [ebp - 4], 0xb
call fcn.00420a7f
lea ecx, [esi + 0xa0]
mov byte [ebp - 4], 0xa
mov dword [ecx], vtable.CBrush.0
call fcn.00405400
mov ecx, esi
mov dword [ebp - 4], 0xffffffff
call fcn.004147a5
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
mov esp, ebp
pop ebp
ret 4
Function at 0x405fa0
Capabilities:
Delete file
Set current directory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x534618
mov eax, dword fs:[0]
push eax
sub esp, 0x28
push ebx
push esi
push edi
mov eax, dword [0x584cc0]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
lea ecx, [ebp - 0x34]
call fcn.0041ed82
mov dword [ebp - 4], 0
call fcn.0040fcc4
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x405ff3
push 0x80004005
call fcn.00401000
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x10], eax
mov byte [ebp - 4], 1
mov eax, dword [esi + 0x390]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
mov eax, dword [esi + 0x394]
push eax
lea ecx, [ebp - 0x10]
push str._s.
push ecx
call fcn.0040b560
mov edi, dword [ebp - 0x10]
add esp, 0xc
push 0
push edi
lea ecx, [ebp - 0x34]
call fcn.0041ee03
cmp eax, 1
jne 0x4060fd
lea ecx, [ebp - 0x34]
call fcn.0041eb6d
lea ecx, [ebp - 0x34]
mov dword [ebp - 0x18], eax
call fcn.0041ed47
test eax, eax
jne 0x4060eb
lea edx, [ebp - 0x14]
push edx
lea ecx, [ebp - 0x34]
call fcn.0041effd
mov byte [ebp - 4], 2
mov ecx, dword [eax]
lea eax, [ecx - 0x10]
lea esi, [edi - 0x10]
cmp eax, esi
je 0x4060c1
cmp dword [esi + 0xc], 0
lea edi, [esi + 0xc]
jl 0x4060b1
mov edx, dword [eax]
cmp edx, dword [esi]
jne 0x4060b1
push eax
call fcn.004020f0
mov ebx, eax
add esp, 4
or eax, 0xffffffff
lock xadd dword [edi], eax
dec eax
test eax, eax
jg 0x4060a9
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
lea edi, [ebx + 0x10]
mov dword [ebp - 0x10], edi
jmp 0x4060c1
mov eax, dword [ecx - 0xc]
push eax
push ecx
lea ecx, [ebp - 0x10]
call fcn.00401ff0
mov edi, dword [ebp - 0x10]
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4060e4
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
cmp dword [ebp - 0x18], 1
je 0x406042
lea ecx, [ebp - 0x34]
call fcn.0041ea87
lea eax, [edi - 0x10]
mov byte [ebp - 4], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40611d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [ebp - 0x34]
mov dword [ebp - 4], 0xffffffff
call fcn.0041edb1
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 0x406e20
Capabilities:
Read .ini file

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x394
mov eax, dword [0x584cc0]
xor eax, esp
mov dword [esp + 0x390], eax
push esi
xor esi, esi
push 0x105
lea eax, [esp + 0x184]
push esi
push eax
mov dword [esp + 0x14], esi
mov dword [esp + 0x18], esi
mov dword [esp + 0x1c], esi
mov dword [esp + 0x20], esi
mov dword [esp + 0x24], esi
mov dword [esp + 0x28], esi
call fcn.00513670
push str.imageFujiSystem3ProgramSystemApp.ini
push 0x58c9b8
push str._s_s
lea ecx, [esp + 0x198]
push 0x105
push ecx
call fcn.0050f695
add esp, 0x20
lea edx, [esp + 0x180]
push edx
push 0x51
push 0x58c960
push esi
push str.Version
push str.SNC_APL
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
test eax, eax
je 0x406f4c
push 0x105
lea eax, [esp + 0x28c]
push esi
push eax
call fcn.00513670
push str.imageFujiSystem3ProgramSystemModule3.bin
push 0x58c9b8
push str._s_s
lea ecx, [esp + 0x2a0]
push 0x105
push ecx
call fcn.0050f695
add esp, 0x20
push esi
lea edx, [esp + 0xc]
push edx
lea eax, [esp + 0x290]
push eax
call fcn.004211a7
cmp eax, 1
jne 0x406f45
push 0x58c960
push str.Install_Application_Ver.__s
lea ecx, [esp + 0x138]
push 0x50
push ecx
call fcn.0050f695
add esp, 0x10
lea edx, [esp + 0x130]
push edx
lea ecx, [edi + 0x1a4]
call fcn.0041b835
pop esi
mov ecx, dword [esp + 0x390]
xor ecx, esp
call fcn.0050ed6a
mov esp, ebp
pop ebp
ret
push str.Install_application_file_is_not_found.
jmp 0x406f51
push str.App.ini_is_not_found.
lea ecx, [edi + 0x1a4]
call fcn.0041b835
push esi
lea ecx, [edi + 0x218]
call fcn.0041b942
mov ecx, dword [esp + 0x394]
pop esi
xor ecx, esp
call fcn.0050ed6a
mov esp, ebp
pop ebp
ret
Function at 0x40c990
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1b8
mov eax, dword [0x584cc0]
xor eax, ebp
mov dword [ebp - 4], eax
mov dword [ebp - 0x1b8], ecx
mov dword [ebp - 0x1a0], 0
mov dword [ebp - 0x19c], 0
mov eax, dword [ebp - 0x1b8]
cmp dword [eax], 0xffffffff
je 0x40c9d7
mov dword [ebp - 0x1a0], 1
jmp 0x40cb2d
mov ecx, dword [ebp + 8]
and ecx, 0xff
shl ecx, 0x18
mov edx, dword [ebp + 8]
and edx, 0xff00
shl edx, 8
or ecx, edx
mov eax, dword [ebp + 8]
and eax, 0xff0000
shr eax, 8
or ecx, eax
mov edx, dword [ebp + 8]
and edx, 0xff000000
shr edx, 0x18
or ecx, edx
mov dword [ebp + 8], ecx
mov eax, 0x101
mov word [ebp - 0x1a4], ax
lea ecx, [ebp - 0x198]
push ecx
movzx edx, word [ebp - 0x1a4]
push edx
call dword [sym.imp.WS2_32.dll_WSAStartup]
mov dword [ebp - 0x19c], eax
cmp dword [ebp - 0x19c], 0
je 0x40ca44
jmp 0x40cb2d
movzx eax, word [ebp - 0x198]
and eax, 0xff
movzx ecx, al
cmp ecx, 1
jne 0x40ca70
movzx edx, word [ebp - 0x198]
shr edx, 8
and edx, 0xff
movzx eax, dl
cmp eax, 1
je 0x40ca75
jmp 0x40cb2d
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov ecx, dword [ebp - 0x1b8]
mov dword [ecx], eax
mov edx, dword [ebp - 0x1b8]
cmp dword [edx], 0xffffffff
jne 0x40ca99
jmp 0x40cb2d
xor eax, eax
mov dword [ebp - 0x1b4], eax
mov dword [ebp - 0x1b0], eax
mov dword [ebp - 0x1ac], eax
mov dword [ebp - 0x1a8], eax
mov ecx, 2
mov word [ebp - 0x1b4], cx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.WS2_32.dll_htonl]
mov dword [ebp - 0x1b0], eax
movzx eax, word [ebp + 0xc]
push eax
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x1b2], ax
push 0x10
lea ecx, [ebp - 0x1b4]
push ecx
mov edx, dword [ebp - 0x1b8]
mov eax, dword [edx]
push eax
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x40cb1b
mov ecx, dword [ebp - 0x1b8]
mov edx, dword [ecx]
push edx
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, dword [ebp - 0x1b8]
mov dword [eax], 0xffffffff
jmp 0x40cb2d
mov dword [ebp - 0x1a0], 1
xor ecx, ecx
jne 0x40c9bd
cmp dword [ebp - 0x1a0], 0
jne 0x40cb45
cmp dword [ebp - 0x19c], 0
jne 0x40cb45
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov eax, dword [ebp - 0x1a0]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0050ed6a
mov esp, ebp
pop ebp
ret 8
Function at 0x40cc30
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x130
mov eax, dword [0x584cc0]
xor eax, ebp
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x130], ecx
mov dword [ebp - 0x10], 0
mov dword [ebp - 8], 1
mov eax, dword [ebp - 0x130]
cmp dword [eax], 0xffffffff
jne 0x40cc69
mov dword [ebp - 8], 0
cmp dword [ebp - 8], 1
jne 0x40cd56
mov dword [ebp - 0x128], 0
mov ecx, dword [ebp + 0x10]
imul ecx, ecx, 0x3e8
mov dword [ebp - 0x124], ecx
mov dword [ebp - 0x120], 0
mov dword [ebp - 0x12c], 0
jmp 0x40ccb1
mov edx, dword [ebp - 0x12c]
add edx, 1
mov dword [ebp - 0x12c], edx
mov eax, dword [ebp - 0x12c]
cmp eax, dword [ebp - 0x120]
jae 0x40ccda
mov ecx, dword [ebp - 0x12c]
mov edx, dword [ebp - 0x130]
mov eax, dword [ebp + ecx*4 - 0x11c]
cmp eax, dword [edx]
jne 0x40ccd8
jmp 0x40ccda
jmp 0x40cca2
mov ecx, dword [ebp - 0x12c]
cmp ecx, dword [ebp - 0x120]
jne 0x40cd15
cmp dword [ebp - 0x120], 0x40
jae 0x40cd15
mov edx, dword [ebp - 0x12c]
mov eax, dword [ebp - 0x130]
mov ecx, dword [eax]
mov dword [ebp + edx*4 - 0x11c], ecx
mov edx, dword [ebp - 0x120]
add edx, 1
mov dword [ebp - 0x120], edx
xor eax, eax
jne 0x40cc96
lea ecx, [ebp - 0x128]
push ecx
push 0
push 0
lea edx, [ebp - 0x120]
push edx
push 1
call dword [sym.imp.WS2_32.dll_select]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x40cd49
mov dword [ebp - 8], 0
jmp 0x40cd56
cmp dword [ebp - 0xc], 0xffffffff
jne 0x40cd56
mov dword [ebp - 8], 0
cmp dword [ebp - 8], 1
jne 0x40cdb0
push 0
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp + 8]
push ecx
mov edx, dword [ebp - 0x130]
mov eax, dword [edx]
push eax
mov ecx, dword [ebp - 0x130]
call fcn.0040ce30
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0xffffffff
jne 0x40cd8c
mov dword [ebp - 8], 0
jmp 0x40cdb0
cmp dword [ebp - 4], 0
jne 0x40cd9b
mov dword [ebp - 8], 0
jmp 0x40cdb0
mov ecx, dword [ebp - 4]
mov dword [ebp - 0x10], ecx
mov edx, dword [ebp + 0xc]
cmp edx, dword [ebp - 0x10]
jae 0x40cdb0
mov dword [ebp - 8], 0
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0050ed6a
mov esp, ebp
pop ebp
ret 0x10

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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov dword [ebp - 0x10], ecx
mov dword [ebp - 0xc], 0
mov dword [ebp - 8], 0
mov eax, dword [ebp + 0xc]
mov dword [ebp - 4], eax
mov ecx, 1
test ecx, ecx
je 0x40ceb2
mov edx, dword [ebp + 0x14]
push edx
mov eax, dword [ebp + 0x10]
push eax
mov ecx, dword [ebp - 4]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.WS2_32.dll_recv]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0xffffffff
jne 0x40ce7e
mov dword [ebp - 0xc], 0xffffffff
jmp 0x40ceb2
cmp dword [ebp - 8], 0
jne 0x40ce8d
mov dword [ebp - 0xc], 0
jmp 0x40ceb2
mov eax, dword [ebp + 0x10]
sub eax, dword [ebp - 8]
mov dword [ebp + 0x10], eax
mov ecx, dword [ebp - 0xc]
add ecx, dword [ebp - 8]
mov dword [ebp - 0xc], ecx
mov edx, dword [ebp - 4]
add edx, dword [ebp - 8]
mov dword [ebp - 4], edx
cmp dword [ebp + 0x10], 0
jg 0x40ceb0
jmp 0x40ceb2
jmp 0x40ce4d
mov eax, dword [ebp - 0xc]
mov esp, ebp
pop ebp
ret 0x10
Function at 0x40cec0
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov dword [ebp - 0x10], ecx
mov dword [ebp - 0xc], 0
mov dword [ebp - 8], 0
mov eax, dword [ebp + 0xc]
mov dword [ebp - 4], eax
mov ecx, 1
test ecx, ecx
je 0x40cf33
mov edx, dword [ebp + 0x14]
push edx
mov eax, dword [ebp + 0x10]
push eax
mov ecx, dword [ebp - 4]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.WS2_32.dll_send]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0xffffffff
jne 0x40cf0e
mov dword [ebp - 0xc], 0xffffffff
jmp 0x40cf33
mov eax, dword [ebp + 0x10]
sub eax, dword [ebp - 8]
mov dword [ebp + 0x10], eax
mov ecx, dword [ebp - 0xc]
add ecx, dword [ebp - 8]
mov dword [ebp - 0xc], ecx
mov edx, dword [ebp - 4]
add edx, dword [ebp - 8]
mov dword [ebp - 4], edx
cmp dword [ebp + 0x10], 0
jg 0x40cf31
jmp 0x40cf33
jmp 0x40cedd
mov eax, dword [ebp - 0xc]
mov esp, ebp
pop ebp
ret 0x10