joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40a7f9
Capabilities:
Contain obfuscated stackstrings

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
push dword [ebp + 0xc]
lea eax, [ebp - 0x38]
and byte [ebp - 2], 0
and word [ebp - 0x14], 0
push 0x40a582
push eax
lea eax, [ebp - 0x10]
mov byte [ebp - 0x10], 0x6e
push eax
mov byte [ebp - 0xf], 0x6f
push dword [ebp + 8]
mov byte [ebp - 0xe], 0x5f
mov byte [ebp - 0xd], 0x61
mov byte [ebp - 0xc], 0x6e
mov byte [ebp - 0xb], 0x74
mov byte [ebp - 0xa], 0x69
mov byte [ebp - 9], 0x73
mov byte [ebp - 8], 0x70
mov byte [ebp - 7], 0x79
mov byte [ebp - 6], 0x77
mov byte [ebp - 5], 0x61
mov byte [ebp - 4], 0x72
mov byte [ebp - 3], 0x65
mov word [ebp - 0x38], 0x41
mov word [ebp - 0x36], 0x6e
mov word [ebp - 0x34], 0x74
mov word [ebp - 0x32], 0x69
mov word [ebp - 0x30], 0x53
mov word [ebp - 0x2e], 0x70
mov word [ebp - 0x2c], 0x79
mov word [ebp - 0x2a], 0x77
mov word [ebp - 0x28], 0x61
mov word [ebp - 0x26], 0x72
mov word [ebp - 0x24], 0x65
mov word [ebp - 0x22], 0x50
mov word [ebp - 0x20], 0x72
mov word [ebp - 0x1e], 0x6f
mov word [ebp - 0x1c], 0x64
mov word [ebp - 0x1a], 0x75
mov word [ebp - 0x18], 0x63
mov word [ebp - 0x16], 0x74
call fcn.0040a8c9
add esp, 0x14
leave
ret

Function at 0x40c914
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
push esi
xor esi, esi
cmp dword [0x43285c], esi
push edi
jne 0x40c94e
mov ecx, 0x432858
push 8
mov eax, esi
pop edi
mov edx, eax
and dl, 1
neg dl
sbb edx, edx
and edx, 0xedb88320
shr eax, 1
xor eax, edx
dec edi
jne 0x40c92a
mov dword [ecx], eax
add ecx, 4
inc esi
cmp ecx, 0x432c58
jl 0x40c925
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0xc]
mov edx, ecx
dec ecx
test edx, edx
not eax
jbe 0x40c983
lea edx, [ecx + 1]
mov ecx, dword [esp + 0x10]
movzx edi, byte [ecx]
mov esi, eax
and esi, 0xff
xor esi, edi
shr eax, 8
mov esi, dword [esi*4 + 0x432858]
xor eax, esi
inc ecx
dec edx
jne 0x40c966
pop edi
pop esi
not eax
ret 0xc

Function at 0x403d61
Capabilities:
Encode data using xor

Disassembly:
push eax
push ebx
mov eax, 0x499
mov ecx, 0x404498
mov bl, byte [ecx]
sub bl, 0xf2
rol bl, 2
sub bl, cl
ror bl, 1
mov byte [ecx], bl
dec ecx
dec eax
jne 0x403d6d
mov eax, 0x261d
mov ecx, 0x403764
mov bl, byte [ecx]
rol bl, 7
ror bl, 2
sub bl, cl
xor bl, 0x91
mov byte [ecx], bl
dec ecx
dec eax
jne 0x403d8a
pop ebx
pop eax
add ecx, 0x2c1a
jmp ecx
Function at 0xc0c610
Capabilities:
Hide graphical window

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40
mov eax, dword [0xc124cc]
cmp dword [eax + 0x28], 0
jne 0xc0c628
xor eax, eax
jmp 0xc0c757
mov ecx, dword [0xc1243c]
mov dword [ebp - 0x20], ecx
mov edx, dword [ebp - 0x20]
add edx, 0xe
mov dword [ebp - 4], edx
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 4]
mov dword [0xc12430], ecx
mov edx, dword [ebp - 4]
mov eax, dword [edx + 8]
mov dword [0xc1242c], eax
push 0
call dword [sym.imp.USER32.dll_GetSystemMetrics]
mov dword [ebp - 0x10], eax
push 1
call dword [sym.imp.USER32.dll_GetSystemMetrics]
mov dword [ebp - 0x18], eax
mov ecx, dword [0xc12430]
mov dword [ebp - 0x40], ecx
mov edx, dword [0xc1242c]
mov dword [ebp - 8], edx
mov eax, dword [ebp - 0x10]
sub eax, dword [ebp - 0x40]
shr eax, 1
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp - 0x18]
sub ecx, dword [ebp - 8]
shr ecx, 1
mov dword [ebp - 0x1c], ecx
push 0
mov edx, dword [0xc124b8]
push edx
push 0
push 0
mov eax, dword [ebp - 8]
push eax
mov ecx, dword [ebp - 0x40]
push ecx
mov edx, dword [ebp - 0x1c]
push edx
mov eax, dword [ebp - 0x14]
push eax
push 0x80000000
push 0xc10680
push 0xc106d0
push 0x88
call dword [sym.imp.USER32.dll_CreateWindowExW]
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp - 0xc]
mov dword [0xc12428], ecx
mov edx, dword [ebp - 0xc]
push edx
call dword [sym.imp.USER32.dll_GetDC]
push eax
call fcn.00c0c550
push 5
mov eax, dword [ebp - 0xc]
push eax
call dword [sym.imp.USER32.dll_ShowWindow]
mov ecx, dword [ebp - 0xc]
push ecx
call dword [sym.imp.USER32.dll_UpdateWindow]
push 0xc0c5e0
mov edx, dword [0xc124cc]
mov eax, dword [edx + 0x34]
imul eax, eax, 0x3e8
push eax
push 0
push 0
call dword [sym.imp.USER32.dll_SetTimer]
mov dword [0xc12434], eax
push 1
push 0
push 0
push 0
lea ecx, [ebp - 0x3c]
push ecx
call dword [sym.imp.USER32.dll_PeekMessageW]
test eax, eax
je 0xc0c757
cmp dword [ebp - 0x38], 0x12
jne 0xc0c74b
mov dword [0xc12444], 0
call fcn.00c0c760
xor eax, eax
jmp 0xc0c757
lea edx, [ebp - 0x3c]
push edx
call dword [sym.imp.USER32.dll_DispatchMessageW]
jmp 0xc0c71c
mov esp, ebp
pop ebp
ret 4

Function at 0xc0db30
Capabilities:
Read .ini file
Read and send data from client to server
Send data
Send data on socket
Terminate process

Disassembly:
push ebp
mov ebp, esp
push ebp
mov dword [ebp], 0
add ebp, 4
mov dword [ebp], 0
add ebp, 4
mov dword [ebp], 0
add ebp, 4
mov dword [ebp], 0
add ebp, 4
mov dword [ebp], 0
add ebp, 4
mov dword [ebp], 0
pop ebp
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_ExitProcess]
Function at 0xc0e6cc
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
pushal
mov esi, dword [esp + 0x24]
mov ecx, dword [esp + 0x28]
mov edi, 0xc10168
sub eax, eax
test esi, esi
je 0xc0e7a4
sub eax, 1
test ecx, ecx
je 0xc0e7a2
test esi, 3
je 0xc0e70a
xor al, byte [esi]
inc esi
mov ebx, 0xff
and ebx, eax
shr eax, 8
xor eax, dword [edi + ebx*4]
dec ecx
jne 0xc0e6ef
mov edx, ecx
and edx, 7
shr ecx, 3
je 0xc0e789
xor eax, dword [esi]
add esi, 4
mov ebx, 0xff
and ebx, eax
shr eax, 8
xor eax, dword [edi + ebx*4]
mov ebx, 0xff
and ebx, eax
shr eax, 8
xor eax, dword [edi + ebx*4]
mov ebx, 0xff
and ebx, eax
shr eax, 8
xor eax, dword [edi + ebx*4]
mov ebx, 0xff
and ebx, eax
shr eax, 8
xor eax, dword [edi + ebx*4]
xor eax, dword [esi]
add esi, 4
mov ebx, 0xff
and ebx, eax
shr eax, 8
xor eax, dword [edi + ebx*4]
mov ebx, 0xff
and ebx, eax
shr eax, 8
xor eax, dword [edi + ebx*4]
mov ebx, 0xff
and ebx, eax
shr eax, 8
xor eax, dword [edi + ebx*4]
mov ebx, 0xff
and ebx, eax
shr eax, 8
xor eax, dword [edi + ebx*4]
dec ecx
jne 0xc0e714
mov ecx, edx
test ecx, ecx
je 0xc0e7a2
xor al, byte [esi]
inc esi
mov ebx, 0xff
and ebx, eax
shr eax, 8
xor eax, dword [edi + ebx*4]
dec ecx
jne 0xc0e78f
not eax
mov dword [esp + 0x1c], eax
popal
ret

Function at 0xc0e7ac
Capabilities:
Decompress data using aplib

Disassembly:
pushal
mov esi, dword [esp + 0x24]
mov edi, dword [esp + 0x28]
cld
mov dl, 0x80
xor ebx, ebx
movsb byte es:[edi], byte [esi]
mov bl, 2
call fcn.00c0e82f
jae 0xc0e7ba
xor ecx, ecx
call fcn.00c0e82f
jae 0xc0e7e9
xor eax, eax
call fcn.00c0e82f
jae 0xc0e7f9
mov bl, 2
inc ecx
mov al, 0x10
call fcn.00c0e82f
adc al, al
jae 0xc0e7db
jne 0xc0e825
stosb byte es:[edi], al
jmp 0xc0e7bd
call fcn.00c0e83b
sub ecx, ebx
jne 0xc0e802
call fcn.00c0e839
jmp 0xc0e821
lodsb al, byte [esi]
shr eax, 1
je 0xc0e84b
adc ecx, ecx
jmp 0xc0e81e
xchg ecx, eax
dec eax
shl eax, 8
lodsb al, byte [esi]
call fcn.00c0e839
cmp eax, 0x7d00
jae 0xc0e81e
cmp ah, 5
jae 0xc0e81f
cmp eax, 0x7f
ja 0xc0e820
inc ecx
inc ecx
xchg ebp, eax
mov eax, ebp
mov bl, 1
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0xc0e7bd
sub edi, dword [esp + 0x28]
mov dword [esp + 0x1c], edi
popal
ret

Function at 0xc0f17c
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0xc12000]
jne 0xc0f186
repz ret
jmp fcn.00c0f42d
Function at 0x140a385
Capabilities:
Encode data using xor

Disassembly:
jmp 0x140a240
xchg al, dh
jmp 0x140a218
movzx ebx, byte [edi - 1]
mov ax, 0x94b8
clc
jg 0x140a1e4
mov ah, byte [esp]
ror dh, 4
lea edx, [esp + edi]
xchg al, dh
jmp 0x140a218
sub bl, cl
mov edx, 0x2f4c499f
mov dh, dl
mov ax, sp
cmc
jmp 0x140a24b
jmp 0x140a2b8
mov ah, byte [esp]
ror dh, 4
lea edx, [esp + edi]
jmp 0x140a1e6
jg 0x140a261
jle 0x140a261
pop ss
xchg byte [ebx + esi*2], dl
invalid
mov al, bl
lea edx, [ebx + edi]
inc dl
jae 0x140a227
setge dh
jmp 0x140a2bb
setge dh
call 0x140a28e
sub dx, si
jmp 0x140a31d
mov dl, byte [esp]
bsf edx, ebp
mov edx, 0x5713fc30
jmp 0x140a325
xchg dh, dl
mov dh, 0x3d
rcl dh, cl
jmp 0x140a307
ror al, 0
inc dh
jmp 0x140a545
lea edx, [ecx + ecx]
mov dh, byte [esp]
bswap edx
btc edx, esp
jmp 0x140a3a9
not dl
rcr edx, 2
jmp 0x140a369
bts edx, ebx
not dl
rcr edx, 2
call 0x140a385
dec edx
js 0x140a38e
jns 0x140a38e
fdivr qword [esi - 0x14]
mov eax, dword [esi - reloc.MSVCRT.dll_strncpy]
cmpsb byte [esi], byte es:[edi]
push ebp
xchg ecx, eax
push esi
rol dword [eax - reloc.MSVCRT.dll_strncpy], 0x14
or al, 0x52
setae dl
jmp 0x140a36e
lea esp, [esp + 8]
xor al, 0x1d
mov dl, byte [esp]
call fcn.0140a3f0
inc ebp
invalid
rol al, 0
jp 0x140a361
bts edx, ebx
jmp 0x140a34b
bswap edx
btc edx, esp
jmp 0x140a3a9
jle 0x140a330
lea edx, [ecx + ecx]
mov dh, byte [esp]
jmp 0x140a4cf
Function at 0x1413cad
Capabilities:
Encode data using xor

Disassembly:
jmp 0x1413aaa
mov dword [esp + 0x24], eax
jmp 0x1413bf5
call 0x1412071
jmp 0x1413b3e
call 0x14120be
pop ecx
jmp 0x1413c0e
call 0x14120ea
jmp 0x1413cc6
pop ecx
sub ecx, 0x1001b755
jmp 0x1413c7c
inc dword [esp + 8]
popfd
lea esp, [esp + 4]
jmp 0x1413bf8
je 0x1413bc2
jne 0x1412041
cmp dword [esp + 4], 0
jne 0x1413b0d
pushal
jmp 0x141206c
pop eax
sub eax, 0xf656d83d
jmp 0x1413b7c
movzx ebx, byte [eax]
add ebx, 0x18945143
cmp ebx, 0x1894520f
jmp 0x1413b25
call 0x1413b8c
push ebp
push ebx
inc ebp
push edx
xor esi, dword [edx]
insb byte es:[edi], dx
insb byte es:[edi], dx
add bh, bh
nop
scasd eax, dword es:[edi]
push esp
imul bl
and eax, 0xfe6e1be8
call dword [eax - 0x15]
xor eax, 0x1b7c02d
adc byte [0x7042a5be], al
pop ebx
add eax, 0x9fbf2d48
mov dword [ebx], eax
mov ebx, dword [ebx]
jmp 0x1413c45
jae 0x1413c30
je 0x1413c36
jo 0x1413c20
imul ebp, dword [esi + 0x64], reloc.MSVCRT.dll_strncpy
xchg ebp, eax
call fcn.01413be5
add byte [eax], al
add byte [eax], al
mov esi, dword [reloc.MSVCRT.dll_strncpy]
lea esp, [esp - 4]
ret
popal
popfd
ret
push dword [esp]
lea esp, [esp + 8]
jmp 0x1413bda
sub ecx, 0x1001b7ee
lea eax, reloc.MSVCRT.dll_strncpy
mov dword [ecx + reloc.MSVCRT.dll_strncpy], eax
popal
jmp 0x1413b0d
jne 0x1413c62
je 0x1413cf8
xchg esi, eax
or al, 0x82
in eax, 0x14
movsb byte es:[edi], byte [esi]
add byte [ecx + 0x5d9b6809], bl
js 0x1413c9f
mov dl, 0x8f
add ebp, ecx
insd dword es:[edi], dx
in al, 0xff
inc dword [ebx + reloc.MSVCRT.dll_strncpy]
jmp 0x1413c2e
pop dword [ebx]
jmp 0x14120b9
inc dword [esp + 8]
push edx
push word [esp + 1]
jmp 0x1413d48
mov dword [ecx + reloc.MSVCRT.dll_strncpy], eax
jmp 0x1413b55
call 0x1413cad
push ebp
push ebx
add byte [eax], al
add byte [ebp + 0x53], dl
inc ebp
push edx
xor esi, dword [edx]
insb byte es:[edi], dx
insb byte es:[edi], dx
add bh, bh
nop
and cl, byte [edx - 2]
js 0x1413c9f
sbb edx, esp
inc eax
salc
mov cl, 0x40
invalid
pop eax
sub eax, 0x790073b2
jmp 0x1413c9d
pushal
jmp 0x14120e5
lea esp, [esp + 2]
mov dword [esp], ecx
mov cx, 0x7ac7
lea ecx, [esp + edx]
mov ecx, ebx
jmp 0x1413e63
mov ecx, dword [esp]
not cx
mov cx, 0xead0
call fcn.01413d9e
push eax
jmp 0x1413eea
push eax
jmp 0x1413f99
call fcn.013fa9b4
jmp 0x1413ed4
call 0x1413fad
add byte [eax], al
add byte [eax], al
mov esi, dword [reloc.MSVCRT.dll_strncpy]
lea esp, [esp - 4]
ret

Function at 0x141559e
Capabilities:
Encode data using xor

Disassembly:
jmp 0x1488264
jmp 0x13fe121
jmp 0x13fe3a9
mov ah, 0x7e
mov eax, 0xcdea1eb5
adc dl, byte [esi - 0x150c0f0f]
sub byte [ebx + 0x60], ah
and edi, 0xffffff97
cmpsd dword [esi], dword es:[edi]
popal
scasb al, byte es:[edi]
and al, 0xbe
mov dh, dh
push ebx
adc dl, dh
sldt word [eax]
add byte [eax], al
add byte [eax], al
add byte [eax], al
add byte [eax + 0x73], ch
clc
xor byte [ebx - 0x18], al
int 0x25
clc
push dword [ecx - 0x2d554c50]
pop esp
sti
push 0x4330f873
call fcn.0140a83b
mov cl, 0xb0
mov bl, 0xaa
rcr byte [esi + ebp - 5], cl
out 0x37, eax
inc edi
add edi, ebp
add eax, 0xd8cea7b4
push 0xc99a0186
fst dword [ebx + reloc.MSVCRT.dll_strncpy]
popfd
loop 0x148823c
cmp ebp, dword [ebx]
push ebp
call fcn.014882d1
Function at 0x14b0654
Capabilities:
Access peb ldr_data

Disassembly:
call fcn.014af055
lea esp, [esp + 2]
mov dword [esp + 0x10], edi
lea esp, [esp + 0x10]
jmp 0x14b06b2
mov eax, dword [eax]
mov eax, dword [eax + 8]
push eax
jmp 0x14af050
mov eax, dword fs:[0x30]
mov eax, dword [eax + 0xc]
mov eax, dword [eax + 0x1c]
jmp 0x14b068d
Function at 0x404690
Capabilities:
Check mutex on windows
Create thread
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x441cdb
mov eax, dword fs:[0]
push eax
sub esp, 0x1a4
mov eax, dword [0x44a008]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
push str.WSDecoder
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x4046e7
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x4047c2
lea eax, [ebp - 0x1a0]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
call sub.JDEC05.dll_JVD05_InitSDK
mov dword [ebp - 0x1a8], 0
mov byte [ebp - 0x1a4], 0
mov dword [ebp - method.WebSocketService.virtual_0], 0x447240
mov dword [ebp - 4], 0
mov esi, 0x2537
push 0x64
call fcn.0044001a
add esp, 4
mov dword [ebp - 0x1b0], eax
mov ecx, eax
mov dword [eax], vtable.JCSocket.0
mov dword [eax + 4], 0xffffffff
mov dword [eax + 8], 1
mov dword [eax + 0xc], 0
mov byte [eax + 0x10], 0
mov byte [eax + 0x24], 0
mov dword [ebp - 0x1a8], eax
mov edx, dword [eax]
push str.127.0.0.1
push esi
call dword [edx + 8]
test eax, eax
je 0x4047df
mov ecx, dword [ebp - 0x1a8]
test ecx, ecx
je 0x40477f
mov eax, dword [ecx]
push 1
call dword [eax]
inc esi
cmp esi, 0x259b
jl 0x404725
call sub.JDEC05.dll_JVD05_ReleaseSDK
push str.wsdecoder_exit_
call fcn.00401070
add esp, 4
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 4], 1
mov ecx, dword [ebp - 0x1a8]
mov dword [ebp - method.WebSocketService.virtual_0], vtable.WebSocketService.0
test ecx, ecx
je 0x4047c2
mov eax, dword [ecx]
push 1
call dword [eax]
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0043ffd8
mov esp, ebp
pop ebp
ret
push 0
push 0
lea eax, [ebp - 0x1ac]
mov byte [ebp - 0x1a4], 1
push eax
push 0x4022f0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
cmp esi, 0x259b
jge 0x404788
push esi
push str.wsdecoder_start_port__d___n
call fcn.00401070
mov esi, dword [sym.imp.KERNEL32.dll_Sleep]
add esp, 8
nop dword [eax]
push 0x64
call esi
jmp 0x404820
Function at 0x406150
Capabilities:
Create tcp socket
Create udp socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x1c
mov eax, dword [0x44a008]
xor eax, esp
mov dword [esp + 0x18], eax
push ebx
push esi
mov esi, dword [ebp + 0xc]
mov ebx, ecx
push edi
push 0
push 1
push 2
mov dword [esp + 0x1c], 1
call dword [sym.imp.WS2_32.dll_socket]
mov dword [ebx + 4], eax
test eax, eax
jns 0x4061ce
push 0xd0
push str.JCSocket::Listen
push str._s_:_d
call fcn.00401070
mov edi, dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
add esp, 0xc
call edi
mov esi, dword [eax]
call edi
push esi
mov edi, eax
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_strerror]
add esp, 4
push eax
push dword [edi]
push dword [ebx + 4]
push str.listen_socket__d__err__d___s_n
call fcn.00401070
add esp, 0x10
jmp 0x406285
mov byte [ebx + 0x10], 0
test eax, eax
jle 0x4061f2
lea ecx, [esp + 0xc]
mov dword [esp + 0xc], 1
push ecx
push 0x8004667e
push eax
call dword [sym.imp.WS2_32.dll_ioctlsocket]
mov eax, dword [ebx + 4]
push 4
lea ecx, [esp + 0x14]
push ecx
push 4
push 0xffff
push eax
call dword [sym.imp.WS2_32.dll_setsockopt]
mov eax, 2
mov word [esp + 0x14], ax
test esi, esi
je 0x40621e
push esi
call dword [sym.imp.WS2_32.dll_inet_addr]
jmp 0x406226
push 0
call dword [sym.imp.WS2_32.dll_htonl]
push dword [ebp + 8]
xorps xmm0, xmm0
mov dword [esp + 0x1c], eax
movq qword [esp + 0x20], xmm0
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x16], ax
lea eax, [esp + 0x14]
push 0x10
push eax
push dword [ebx + 4]
call dword [sym.imp.WS2_32.dll_bind]
mov ecx, dword [ebx + 4]
test eax, eax
je 0x40625b
push ecx
jmp 0x40627f
push 5
push ecx
call dword [sym.imp.WS2_32.dll_listen]
test eax, eax
jne 0x40627c
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x18]
xor ecx, esp
call fcn.0043ffd8
mov esp, ebp
pop ebp
ret 8
push dword [ebx + 4]
call dword [sym.imp.WS2_32.dll_closesocket]
mov ecx, dword [esp + 0x24]
or eax, 0xffffffff
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0043ffd8
mov esp, ebp
pop ebp
ret 8
Function at 0x4062a0
Capabilities:
Get socket status
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x134
mov eax, dword [0x44a008]
xor eax, esp
mov dword [esp + 0x130], eax
mov eax, ecx
push ebx
push esi
push edi
mov ecx, dword [eax + 4]
mov dword [esp + 0xc], eax
test ecx, ecx
js 0x406340
mov eax, dword [ebp + 8]
mov dword [esp + 0x18], eax
lea eax, [esp + 0x18]
push eax
push 0
push 0
lea eax, [esp + 0x3c]
mov dword [esp + 0x40], ecx
push eax
lea eax, [ecx + 1]
mov dword [esp + 0x40], 1
push eax
mov dword [esp + 0x30], 0
call dword [sym.imp.WS2_32.dll_select]
test eax, eax
jns 0x406359
push 0x112
push str.JCSocket::Accept
push str._s_:_d
call fcn.00401070
mov edi, dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
add esp, 0xc
call edi
mov esi, dword [eax]
call edi
push esi
mov edi, eax
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_strerror]
add esp, 4
push eax
push dword [edi]
push str.Service_Select_err__d___s_n
call fcn.00401070
add esp, 0xc
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x130]
xor ecx, esp
call fcn.0043ffd8
mov esp, ebp
pop ebp
ret 4
je 0x406340
mov edi, dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov ebx, 3
mov dword [esp + 0x10], 0x10
nop
dec ebx
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0x24]
push eax
mov eax, dword [esp + 0x14]
push dword [eax + 4]
call dword [sym.imp.WS2_32.dll_accept]
mov esi, eax
cmp esi, 0xffffffff
jne 0x406398
call edi
cmp dword [eax], 4
je 0x406371
jmp 0x40639c
test esi, esi
jns 0x4063bf
call edi
cmp dword [eax], 0xb
je 0x4063ad
call edi
cmp dword [eax], 0x8c
jne 0x406340
push ebx
push str.Socket_accept_....__d__n
call fcn.00401070
add esp, 8
test ebx, ebx
jg 0x406370
push 0x64
call fcn.0044001a
mov edi, eax
add esp, 4
mov dword [esp + 0xc], edi
lea ebx, [edi + 0x24]
mov dword [edi], vtable.JCSocket.0
mov dword [edi + 4], 0xffffffff
mov dword [edi + 8], 1
mov dword [edi + 0xc], 0
mov byte [edi + 0x10], 0
mov byte [ebx], 0
mov dword [edi + 4], esi
mov dword [esp + 0x14], 1
mov eax, dword [edi + 4]
mov byte [edi + 0x10], 0
test eax, eax
jle 0x406423
lea ecx, [esp + 0xc]
mov dword [esp + 0xc], 1
push ecx
push 0x8004667e
push eax
call dword [sym.imp.WS2_32.dll_ioctlsocket]
push 4
lea eax, [esp + 0x18]
push eax
push 1
push 6
push esi
call dword [sym.imp.WS2_32.dll_setsockopt]
push dword [esp + 0x24]
call dword [sym.imp.WS2_32.dll_inet_ntoa]
push eax
push 0x446db0
push 0x40
push ebx
call fcn.00401af0
add esp, 0x10
push dword [esp + 0x22]
call dword [sym.imp.WS2_32.dll_ntohs]
mov ecx, dword [esp + 0x13c]
movzx eax, ax
mov dword [edi + 0xc], eax
mov eax, edi
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0043ffd8
mov esp, ebp
pop ebp
ret 4
Function at 0x4067c0
Capabilities:
Get socket status
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x124
mov eax, dword [0x44a008]
xor eax, esp
mov dword [esp + 0x120], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov edi, ecx
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], edi
cmp dword [edi + 4], 0
jl 0x40699f
test eax, eax
je 0x40699f
mov ecx, dword [ebp + 0x10]
mov eax, 0x431bde83
imul ecx
sar edx, 0x12
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [esp + 0x18], eax
imul eax, eax, 0xf4240
sub ecx, eax
mov dword [esp + 0x1c], ecx
mov esi, dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov eax, dword [edi + 4]
lea ecx, [esp + 0x18]
push ecx
push 0
push 0
lea ecx, [esp + 0x2c]
mov dword [esp + 0x30], eax
push ecx
inc eax
mov dword [esp + 0x30], 1
push eax
call dword [sym.imp.WS2_32.dll_select]
mov ebx, eax
test ebx, ebx
jle 0x406986
lea eax, [esp + 0x20]
push eax
push dword [edi + 4]
call dword [sym.imp.WS2_32.dll___WSAFDIsSet]
test eax, eax
je 0x406826
mov edx, dword [esp + 0x20]
xor eax, eax
test edx, edx
je 0x4068a9
mov ecx, dword [edi + 4]
cmp dword [esp + eax*4 + 0x24], ecx
je 0x406881
inc eax
cmp eax, edx
jb 0x406874
jmp 0x4068a9
lea ecx, [edx - 1]
cmp eax, ecx
jae 0x4068a4
nop dword [eax + eax]
mov ecx, dword [esp + eax*4 + 0x28]
mov dword [esp + eax*4 + 0x24], ecx
inc eax
mov edx, dword [esp + 0x20]
lea ecx, [edx - 1]
cmp eax, ecx
jb 0x406890
dec edx
mov dword [esp + 0x20], edx
push 0
push dword [ebp + 0xc]
push dword [esp + 0x18]
push dword [edi + 4]
call dword [sym.imp.WS2_32.dll_recv]
mov ebx, eax
test ebx, ebx
jns 0x406981
call esi
cmp dword [eax], 4
je 0x4068dd
call esi
cmp dword [eax], 0xb
je 0x4068dd
call esi
cmp dword [eax], 0x8c
jne 0x406925
push 0x1ed
push str.JCSocket::Recv
push str._s_:_d
call fcn.00401070
add esp, 0xc
call esi
mov esi, dword [eax]
mov eax, dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
call eax
push esi
mov edi, eax
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_strerror]
add esp, 4
push eax
push dword [edi]
push ebx
push str.socket_recv_err__d__d__s_n
call fcn.00401070
mov edi, dword [esp + 0x24]
add esp, 0x10
jmp 0x406820
push 0x1f0
push str.JCSocket::Recv
push str._s_:_d
call fcn.00401070
mov eax, dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
add esp, 0xc
mov esi, dword [edi + 0xc]
call eax
push esi
lea ecx, [edi + 0x24]
push ecx
push dword [eax]
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_strerror]
add esp, 4
push eax
push ebx
push str.socket_recv_err___d___s___s___d__n
call fcn.00401070
add esp, 0x14
or ebx, 0xffffffff
mov eax, ebx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x120]
xor ecx, esp
call fcn.0043ffd8
mov esp, ebp
pop ebp
ret 0xc
jne 0x406986
or ebx, 0xffffffff
mov eax, ebx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x120]
xor ecx, esp
call fcn.0043ffd8
mov esp, ebp
pop ebp
ret 0xc
mov ecx, dword [esp + 0x12c]
or eax, 0xffffffff
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0043ffd8
mov esp, ebp
pop ebp
ret 0xc