joyce8/EMBER2024-capa huggingface dataset:
Function at 0x560840
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x63c978
mov eax, dword fs:[0]
push eax
sub esp, 0x2c
push ebx
push esi
push edi
mov eax, dword [0x703eb0]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], ecx
cmp dword [ecx + 4], 0xffffffff
jne 0x5608a0
cmp dword [ecx + 8], 0
jne 0x5608a0
mov ecx, dword [ebp + 0x18]
test ecx, ecx
je 0x56088a
mov eax, dword [ecx]
mov edx, dword [eax + 0x10]
push str.Failed_to_write_because_file_is_not_open.
call edx
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x14
mov edi, dword [ebp + 0x14]
mov ebx, dword [ebp + 8]
test edi, edi
je 0x5608b7
mov dword [edi], 0
mov dword [edi + 4], 0
mov edx, dword [ebp + 0xc]
mov eax, edx
or eax, dword [ebp + 0x10]
je 0x5609a7
cmp dword [ebp + 0x10], 0
jl 0x5608dc
jg 0x5608d5
cmp edx, 0x989680
jbe 0x5608dc
mov esi, 0x989680
jmp 0x5608de
mov esi, edx
mov eax, dword [ecx + 4]
cmp eax, 0xffffffff
je 0x56095f
push 0
lea ecx, [ebp + 8]
push ecx
push esi
push ebx
push eax
mov dword [ebp + 8], 0
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x560905
cmp dword [ebp + 8], esi
je 0x56097b
mov edi, dword [ebp + 0x18]
test edi, edi
je 0x560949
lea ecx, [ebp - 0x38]
call fcn.0053ba20
lea ecx, [ebp - 0x38]
mov dword [ebp - 4], 0
call fcn.0053df90
mov esi, dword [edi]
lea ecx, [ebp - 0x38]
call fcn.00595640
mov edx, dword [esi + 0x28]
push eax
push str.WriteFileError
mov ecx, edi
call edx
lea ecx, [ebp - 0x38]
mov dword [ebp - 4], 0xffffffff
call fcn.0053bcf0
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x14
mov eax, dword [ecx + 8]
test eax, eax
je 0x560981
push eax
push 1
push esi
push ebx
call fcn.005279cd
add esp, 0x10
cmp eax, 1
jne 0x5609bd
mov dword [ebp + 8], esi
mov edx, dword [ebp + 0xc]
mov ecx, dword [ebp - 0x10]
add ebx, esi
sub edx, esi
mov eax, 0
sbb dword [ebp + 0x10], eax
mov dword [ebp + 0xc], edx
cmp edi, eax
je 0x56099c
mov esi, dword [ebp + 8]
add dword [edi], esi
adc dword [edi + 4], eax
mov eax, edx
or eax, dword [ebp + 0x10]
jne 0x5608c5
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x14
mov ecx, dword [ebp + 0x18]
test ecx, ecx
je 0x5609d0
mov eax, dword [ecx]
mov edx, dword [eax + 0x10]
push str.fwrite_failed.
call edx
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x14
Function at 0x5609f0
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x63b9a8
mov eax, dword fs:[0]
push eax
sub esp, 0x28
push ebx
push esi
push edi
mov eax, dword [0x703eb0]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ecx + 4]
cmp eax, 0xffffffff
je 0x560a8f
push 0
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x560a79
mov esi, dword [ebp + 8]
test esi, esi
je 0x560a79
lea ecx, [ebp - 0x34]
call fcn.0053ba20
lea ecx, [ebp - 0x34]
mov dword [ebp - 4], 0
call fcn.0053df90
mov edi, dword [esi]
lea ecx, [ebp - 0x34]
call fcn.00595640
push eax
mov eax, dword [edi + 0x10]
mov ecx, esi
call eax
mov edx, dword [esi]
mov eax, dword [edx + 0x10]
push str.Failed_to_get_file_size__32_
mov ecx, esi
call eax
lea ecx, [ebp - 0x34]
mov dword [ebp - 4], ebx
call fcn.0053bcf0
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [ecx + 8]
test ecx, ecx
je 0x560ab9
push ecx
call fcn.005274e0
push eax
call fcn.00629545
add esp, 8
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
or eax, 0xffffffff
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4

Function at 0x560ad0
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x63ec08
mov eax, dword fs:[0]
push eax
sub esp, 0x2c
push esi
push edi
mov eax, dword [0x703eb0]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ecx + 4]
cmp eax, 0xffffffff
je 0x560b99
lea ecx, [ebp - 0x10]
push ecx
xor edi, edi
push eax
mov dword [ebp - 0x10], edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0xffffffff
jne 0x560b79
mov esi, dword [ebp + 8]
cmp esi, edi
je 0x560b61
lea ecx, [ebp - 0x38]
call fcn.0053ba20
lea ecx, [ebp - 0x38]
mov dword [ebp - 4], edi
call fcn.0053df90
mov edi, dword [esi]
lea ecx, [ebp - 0x38]
call fcn.00595640
mov edx, dword [edi + 0x10]
push eax
mov ecx, esi
call edx
mov eax, dword [esi]
mov edx, dword [eax + 0x10]
push str.Failed_to_get_file_size__64_
mov ecx, esi
call edx
lea ecx, [ebp - 0x38]
mov dword [ebp - 4], 0xffffffff
call fcn.0053bcf0
or eax, 0xffffffff
or edx, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [ebp - 0x10]
push ecx
push eax
call fcn.0055d290
add esp, 8
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [ecx + 8]
test ecx, ecx
je 0x560b61
push ecx
call fcn.005274e0
push eax
call fcn.0062963b
add esp, 8
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret 4
Function at 0x590600
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ecx
cmp dword [eax + 0x38], 0
mov cl, byte [eax + 0x34]
push ebx
push esi
mov dword [ebp - 4], 0
mov ebx, 1
jle 0x59064a
mov edx, dword [eax + 0x260]
push edi
movzx edi, cl
mov esi, edx
shr esi, 0x18
xor esi, edi
shl edx, 8
xor edx, dword [esi*4 + 0x710e40]
mov esi, dword [ebp - 4]
add esi, ebx
mov dword [eax + 0x260], edx
mov dword [ebp - 4], esi
cmp esi, dword [eax + 0x38]
jl 0x590625
pop edi
mov edx, dword [eax + 0x34]
mov byte [eax + edx + 0x58], bl
mov esi, dword [eax + 0x38]
mov edx, esi
sub edx, ebx
je 0x5906d8
sub edx, ebx
je 0x5906ba
sub edx, ebx
je 0x5906ae
mov byte [esi + eax + 0x54], bl
mov edx, dword [eax + 0x44]
mov esi, dword [eax + 0x24]
mov byte [edx + esi], cl
add dword [eax + 0x44], ebx
mov edx, dword [eax + 0x44]
mov esi, dword [eax + 0x24]
mov byte [edx + esi], cl
add dword [eax + 0x44], ebx
mov edx, dword [eax + 0x44]
mov esi, dword [eax + 0x24]
mov byte [edx + esi], cl
add dword [eax + 0x44], ebx
mov edx, dword [eax + 0x44]
mov esi, dword [eax + 0x24]
mov byte [edx + esi], cl
add dword [eax + 0x44], ebx
mov cl, byte [eax + 0x38]
mov esi, dword [eax + 0x44]
mov edx, dword [eax + 0x24]
sub cl, 4
mov byte [esi + edx], cl
add dword [eax + 0x44], ebx
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [eax + 0x44]
mov esi, dword [eax + 0x24]
mov byte [edx + esi], cl
add dword [eax + 0x44], ebx
mov edx, dword [eax + 0x44]
mov esi, dword [eax + 0x24]
mov byte [edx + esi], cl
add dword [eax + 0x44], ebx
mov edx, dword [eax + 0x44]
mov esi, dword [eax + 0x24]
mov byte [edx + esi], cl
add dword [eax + 0x44], ebx
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov esi, dword [eax + 0x44]
mov edx, dword [eax + 0x24]
mov byte [edx + esi], cl
add dword [eax + 0x44], ebx
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x595010
Capabilities:
Hash data using crc32b

Disassembly:
cmp byte [0x720710], 0
jne 0x5951df
push 0x400
call fcn.00419f69
add esp, 4
push ebx
push esi
mov dword [0x720714], eax
xor eax, eax
push edi
xor ecx, ecx
test al, 1
je 0x59503f
mov ecx, 0x80
mov edx, eax
shr edx, 1
test dl, 1
je 0x59504b
or ecx, 0x40
shr edx, 1
test dl, 1
je 0x595055
or ecx, 0x20
shr edx, 1
test dl, 1
je 0x59505f
or ecx, 0x10
shr edx, 1
test dl, 1
je 0x595069
or ecx, 8
shr edx, 1
test dl, 1
je 0x595073
or ecx, 4
shr edx, 1
test dl, 1
je 0x59507d
or ecx, 2
test dl, 2
je 0x595085
or ecx, 1
mov edx, dword [0x720714]
shl ecx, 0x18
mov dword [edx + eax*4], ecx
mov edx, dword [0x720714]
mov ecx, dword [edx + eax*4]
mov esi, ecx
and esi, 0x80000000
neg esi
sbb esi, esi
and esi, 0x4c11db7
add ecx, ecx
xor esi, ecx
mov dword [edx + eax*4], esi
mov edx, dword [0x720714]
mov ecx, dword [edx + eax*4]
mov esi, ecx
and esi, 0x80000000
neg esi
sbb esi, esi
and esi, 0x4c11db7
add ecx, ecx
xor esi, ecx
mov dword [edx + eax*4], esi
mov edx, dword [0x720714]
mov ecx, dword [edx + eax*4]
mov esi, ecx
and esi, 0x80000000
neg esi
sbb esi, esi
and esi, 0x4c11db7
add ecx, ecx
xor esi, ecx
mov dword [edx + eax*4], esi
mov edx, dword [0x720714]
mov ecx, dword [edx + eax*4]
mov esi, ecx
and esi, 0x80000000
neg esi
sbb esi, esi
and esi, 0x4c11db7
add ecx, ecx
xor esi, ecx
mov dword [edx + eax*4], esi
mov edx, dword [0x720714]
mov ecx, dword [edx + eax*4]
mov esi, ecx
and esi, 0x80000000
neg esi
sbb esi, esi
and esi, 0x4c11db7
add ecx, ecx
xor esi, ecx
mov dword [edx + eax*4], esi
mov edx, dword [0x720714]
mov ecx, dword [edx + eax*4]
mov esi, ecx
and esi, 0x80000000
neg esi
sbb esi, esi
and esi, 0x4c11db7
add ecx, ecx
xor esi, ecx
mov dword [edx + eax*4], esi
mov edx, dword [0x720714]
mov ecx, dword [edx + eax*4]
mov esi, ecx
and esi, 0x80000000
neg esi
sbb esi, esi
and esi, 0x4c11db7
add ecx, ecx
xor esi, ecx
mov dword [edx + eax*4], esi
mov edx, dword [0x720714]
mov ecx, dword [edx + eax*4]
mov esi, ecx
and esi, 0x80000000
neg esi
sbb esi, esi
and esi, 0x4c11db7
add ecx, ecx
xor esi, ecx
mov dword [edx + eax*4], esi
mov edi, dword [0x720714]
mov edx, dword [edi + eax*4]
xor esi, esi
lea ecx, [esi + 0x1f]
nop
test dl, 1
je 0x5951be
mov ebx, 1
shl ebx, cl
or esi, ebx
dec ecx
shr edx, 1
cmp ecx, 0xffffffff
jg 0x5951b0
mov dword [edi + eax*4], esi
inc eax
cmp eax, 0xff
jbe 0x595034
pop edi
pop esi
mov byte [0x720710], 1
pop ebx
ret
Function at 0x595200
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40c
mov eax, dword [0x703eb0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, dword [ebp + 8]
push edi
mov edi, dword [ebp + 0xc]
mov dword [ebp - 0x408], eax
test edi, edi
jne 0x59523a
pop edi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00521602
mov esp, ebp
pop ebp
ret
push esi
call fcn.00595010
or esi, 0xffffffff
cmp dword [ebp - 0x408], 0
jne 0x59526d
mov eax, dword [0x720714]
movzx edx, byte [ebx]
mov ecx, esi
and ecx, 0xff
xor ecx, edx
shr esi, 8
xor esi, dword [eax + ecx*4]
inc ebx
dec edi
jne 0x595251
jmp 0x595372
push 0x400
lea eax, [ebp - 0x404]
push 0
push eax
call fcn.005236f0
mov ecx, dword [0x720714]
add esp, 0xc
lea esp, [esp]
movzx eax, byte [ebx]
inc dword [ebp + eax*4 - 0x404]
mov edx, esi
and edx, 0xff
xor edx, eax
shr esi, 8
xor esi, dword [ecx + edx*4]
inc ebx
dec edi
jne 0x595290
mov ecx, dword [ebp - 0x404]
add ecx, dword [ebp - 0x400]
xor ebx, ebx
add ecx, dword [ebp - 0x3fc]
mov eax, 7
add ecx, dword [ebp - 0x3f8]
add ecx, dword [ebp - 0x3f4]
add ecx, dword [ebp - 0x3f0]
add ecx, dword [ebp - 0x3ec]
xor edx, edx
add edx, dword [ebp + eax*4 - 0x404]
add edi, dword [ebp + eax*4 - 0x400]
add eax, 2
cmp eax, 0x7f
jl 0x5952e1
cmp eax, 0x80
jge 0x595306
mov ebx, dword [ebp + eax*4 - 0x404]
inc eax
add edi, edx
add ebx, edi
xor edx, edx
xor edi, edi
mov dword [ebp - 0x40c], ebx
cmp eax, 0x100
jge 0x595360
mov ebx, 0x100
sub ebx, eax
cmp ebx, 2
jl 0x595348
jmp 0x595330
add edx, dword [ebp + eax*4 - 0x404]
add edi, dword [ebp + eax*4 - 0x400]
add eax, 2
cmp eax, 0xff
jl 0x595330
cmp eax, 0x100
jge 0x595356
add ecx, dword [ebp + eax*4 - 0x404]
mov ebx, dword [ebp - 0x40c]
add edi, edx
add ecx, edi
mov eax, dword [ebp - 0x408]
shr ebx, 2
cmp ebx, ecx
sbb edx, edx
neg edx
mov word [eax], dx
mov ecx, dword [ebp - 4]
mov eax, esi
pop esi
pop edi
xor ecx, ebp
not eax
pop ebx
call fcn.00521602
mov esp, ebp
pop ebp
ret
Function at 0x5a5100
Capabilities:
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x220
mov eax, dword [0x703eb0]
xor eax, ebp
mov dword [ebp - 4], eax
cmp byte [0x711614], 0
push ebx
mov ebx, ecx
mov dword [ebp - 0x220], ebx
jne 0x5a5136
mov al, 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00521602
mov esp, ebp
pop ebp
ret
push esi
push edi
push 0x190
lea eax, [ebp - 0x218]
push 0
push eax
call fcn.005236f0
mov edi, dword [sym.imp.WS2_32.dll_WSAStartup]
add esp, 0xc
lea ecx, [ebp - 0x218]
push ecx
push 0x909
call edi
mov esi, eax
cmp esi, 0x276c
jne 0x5a521e
mov ebx, 5
mov dword [ebp - 0x21c], 2
nop
cmp ebx, 1
jl 0x5a51da
dec dword [ebp - 0x21c]
jns 0x5a5198
mov dword [ebp - 0x21c], 9
dec ebx
test ebx, ebx
je 0x5a51da
push 0x190
lea edx, [ebp - 0x218]
push 0
push edx
call fcn.005236f0
movzx ecx, byte [ebp - 0x21c]
movzx edx, bl
add esp, 0xc
shl cx, 8
lea eax, [ebp - 0x218]
push eax
or cx, dx
movzx eax, cx
push eax
call edi
mov esi, eax
cmp esi, 0x276c
je 0x5a5180
test esi, esi
jne 0x5a5228
mov ecx, dword [ebp - 0x21c]
push ecx
push ebx
lea edx, [ebp - 0x88]
push str.Using_ws2_32.dll_version__d__d
push edx
call fcn.00629264
mov ecx, dword [ebp - 0x220]
mov eax, dword [ecx]
mov eax, dword [eax + 0x28]
add esp, 0x10
lea edx, [ebp - 0x88]
push edx
push str.ws2_32_DLL_Version
call eax
mov ebx, dword [ebp - 0x220]
jmp 0x5a52c8
test esi, esi
je 0x5a52c8
jmp 0x5a522e
mov ebx, dword [ebp - 0x220]
cmp esi, 0x276b
jne 0x5a5249
mov edx, dword [ebx]
mov eax, dword [edx + 0x10]
push str.The_underlying_network_subsystem_is_not_ready_for_network_communication.
mov ecx, ebx
call eax
jmp 0x5a52c8
cmp esi, 0x276c
jne 0x5a5261
mov edx, dword [ebx]
mov eax, dword [edx + 0x10]
push str.The_version_of_Windows_Sockets_support_requested_is_not_provided_by_this_particular_Windows_Sockets_implementation.
mov ecx, ebx
call eax
jmp 0x5a52c8
cmp esi, 0x2734
jne 0x5a5279
mov edx, dword [ebx]
mov eax, dword [edx + 0x10]
push str.A_blocking_Windows_Sockets_1.1_operation_is_in_progress.
mov ecx, ebx
call eax
jmp 0x5a52c8
cmp esi, 0x2753
jne 0x5a5291
mov edx, dword [ebx]
mov eax, dword [edx + 0x10]
push str.Limit_on_the_number_of_tasks_supported_by_the_Windows_Sockets_implementation_has_been_reached.
mov ecx, ebx
call eax
jmp 0x5a52c8
cmp esi, 0x271e
jne 0x5a52a9
mov edx, dword [ebx]
mov eax, dword [edx + 0x10]
push str.The_lpWSAData_is_not_a_valid_pointer.
mov ecx, ebx
call eax
jmp 0x5a52c8
push esi
lea ecx, [ebp - 0x38]
push str.WSAStartup_error:_0x_x
push ecx
call fcn.00629264
mov edx, dword [ebx]
mov edx, dword [edx + 0x10]
add esp, 0xc
lea eax, [ebp - 0x38]
push eax
mov ecx, ebx
call edx
mov edi, ebx
mov byte [0x711614], 0
call fcn.005a5010
mov ecx, dword [ebp - 4]
xor eax, eax
test esi, esi
pop edi
sete al
pop esi
xor ecx, ebp
pop ebx
call fcn.00521602
mov esp, ebp
pop ebp
ret
Function at 0x5a52f0
Capabilities:
Set socket configuration

Disassembly:
push esi
mov esi, ecx
mov edx, dword [esi + 0xa4]
cmp edx, 0xffffffff
je 0x5a535c
mov eax, dword [esi + 8]
lea ecx, [esi + 8]
push edi
mov edi, dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
je 0x5a532d
cmp eax, 0x3e8
jb 0x5a532d
cmp eax, 0x1e8480
jae 0x5a532d
push 4
push ecx
push 0x1001
push 0xffff
push edx
call edi
mov eax, dword [esi + 0xc]
lea ecx, [esi + 0xc]
test eax, eax
je 0x5a535b
cmp eax, 0x3e8
jb 0x5a535b
cmp eax, 0x1e8480
jae 0x5a535b
mov eax, dword [esi + 0xa4]
push 4
push ecx
push 0x1002
push 0xffff
push eax
call edi
pop edi
pop esi
ret
Function at 0x5a5e00
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x110
mov eax, dword [0x703eb0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ecx + 0xa4]
push esi
mov esi, dword [ebp + 0xc]
cmp eax, 0xffffffff
jne 0x5a5e43
mov eax, dword [esi]
mov edx, dword [eax + 0x10]
push str.invalid_socket__not_ready_for_writing.
mov ecx, esi
call edx
xor al, al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00521602
mov esp, ebp
pop ebp
ret 8
mov ecx, dword [ebp + 8]
test ecx, ecx
jne 0x5a5e4f
mov ecx, 0x20f580
mov dword [ebp - 0x104], eax
lea eax, [ebp - 0x110]
push eax
push 0
mov dword [ebp - 0x110], ecx
lea ecx, [ebp - 0x108]
push ecx
push 0
push 0
mov dword [ebp - 0x10c], 0
mov dword [ebp - 0x108], 1
call dword [sym.imp.WS2_32.dll_select]
cmp eax, 0xffffffff
jne 0x5a5e95
push str.select_returned_a_socket_error
jmp 0x5a5eb2
cmp eax, 1
jne 0x5a5ead
mov al, al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00521602
mov esp, ebp
pop ebp
ret 8
push str.socket_is_not_ready_for_writing.
mov edx, dword [esi]
mov eax, dword [edx + 0x10]
mov ecx, esi
call eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
xor al, al
pop esi
call fcn.00521602
mov esp, ebp
pop ebp
ret 8
Function at 0x5a5ed0
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x224
mov eax, dword [0x703eb0]
xor eax, ebp
mov dword [ebp - 4], eax
mov edx, dword [ebp + 0x14]
push ebx
mov ebx, dword [ebp + 0x1c]
push esi
mov esi, dword [ebp + 0x18]
mov byte [esi], 0
mov eax, ecx
mov ecx, dword [ebp + 0x10]
mov byte [ebx], 0
mov dword [ebp - 0x214], esi
mov byte [edx], 0
mov esi, dword [eax + 0xa4]
mov dword [ebp - 0x21c], eax
mov dword [ebp - 0x210], ecx
mov dword [ebp - 0x218], edx
cmp esi, 0xffffffff
jne 0x5a5f42
mov eax, dword [ecx]
mov edx, dword [eax + 0x10]
push str.invalid_socket__not_ready_for_writing.
call edx
pop esi
mov byte [ebx], 1
xor al, al
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00521602
mov esp, ebp
pop ebp
ret 0x18
mov ecx, dword [ebp + 8]
test ecx, ecx
jne 0x5a5f4e
mov ecx, 0x1499700
mov eax, 0x10624dd3
mul ecx
shr edx, 6
mov dword [ebp - 0x224], edx
imul edx, edx, 0x3e8
sub ecx, edx
imul ecx, ecx, 0x3e8
push edi
mov eax, 1
xor edi, edi
cmp byte [ebp + 0xc], 0
mov dword [ebp - 0x220], ecx
mov dword [ebp - 0x104], esi
mov dword [ebp - 0x108], eax
je 0x5a5f9e
mov dword [ebp - 0x208], esi
mov dword [ebp - 0x20c], eax
lea edi, [ebp - 0x20c]
lea eax, [ebp - 0x224]
push eax
push edi
lea ecx, [ebp - 0x108]
push ecx
push 0
push 0
call dword [sym.imp.WS2_32.dll_select]
cmp eax, 0xffffffff
jne 0x5a5fd6
mov ecx, dword [ebp - 0x210]
mov edx, dword [ecx]
mov eax, dword [edx + 0x10]
push str.select_returned_a_socket_error
call eax
mov byte [ebx], 1
jmp 0x5a6065
test eax, eax
jle 0x5a603d
mov esi, dword [ebp - 0x21c]
mov edx, dword [esi + 0xa4]
lea ecx, [ebp - 0x108]
push ecx
push edx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x5a600c
pop edi
pop esi
mov al, 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00521602
mov esp, ebp
pop ebp
ret 0x18
test edi, edi
je 0x5a6029
mov eax, dword [esi + 0xa4]
push edi
push eax
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x5a6029
mov ecx, dword [ebp - 0x218]
jmp 0x5a6062
mov ecx, dword [ebp - 0x210]
mov edx, dword [ecx]
mov eax, dword [edx + 0x14]
push str.Socket_select_after_connect_returned_0
call eax
jmp 0x5a6065
cmp byte [ebp + 0xc], 0
mov ecx, dword [ebp - 0x210]
mov edx, dword [ecx]
mov eax, dword [edx + 0x10]
je 0x5a6055
push str.timeout_waiting_for_connect_to_complete
jmp 0x5a605a
push str.socket_is_not_ready_for_writing
call eax
mov ecx, dword [ebp - 0x214]
mov byte [ecx], 1
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
xor al, al
pop ebx
call fcn.00521602
mov esp, ebp
pop ebp
ret 0x18
Function at 0x5a6510
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x114
mov eax, dword [0x703eb0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x14]
push ebx
mov ebx, dword [ebp + 0x18]
push esi
push edi
mov edi, dword [ebp + 0x10]
mov esi, ecx
mov dword [ebp - 0x10c], eax
mov byte [eax], 0
test edi, edi
je 0x5a6577
push 0x78
push 0
mov ecx, edi
call fcn.0056d720
mov ecx, edi
call fcn.0056d4d0
test al, al
je 0x5a6577
mov eax, dword [ebx]
mov edx, dword [eax + 0x10]
push str.Wait_for_data_aborted_by_app
mov ecx, ebx
call edx
pop edi
pop esi
xor al, al
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00521602
mov esp, ebp
pop ebp
ret 0x18
mov edi, dword [esi + 0xa4]
cmp edi, 0xffffffff
jne 0x5a65ae
mov eax, dword [ebx]
mov edx, dword [eax + 0x10]
push str.Wait_for_data_passed_invalid_socket.
mov ecx, ebx
call edx
mov eax, dword [ebp - 0x10c]
pop edi
pop esi
mov byte [eax], 1
xor al, al
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00521602
mov esp, ebp
pop ebp
ret 0x18
cmp byte [ebp + 0xc], 0
mov ecx, dword [ebp + 8]
jne 0x5a65c0
test ecx, ecx
jne 0x5a65c0
mov ecx, 0x14
mov eax, 0x10624dd3
mul ecx
shr edx, 6
mov eax, edx
imul eax, eax, 0xfffffc18
add ecx, eax
cmp ecx, 0x7a120
jbe 0x5a65e1
mov ecx, 0x7a120
imul ecx, ecx, 0x3e8
cmp byte [ebp + 0xc], 0
jne 0x5a65fa
test edx, edx
jne 0x5a65fa
test ecx, ecx
jne 0x5a65fa
mov ecx, 0x3e8
mov dword [ebp - 0x110], ecx
lea ecx, [ebp - 0x114]
push ecx
push 0
mov dword [ebp - 0x114], edx
push 0
lea edx, [ebp - 0x108]
push edx
push 0
mov dword [ebp - 0x104], edi
mov dword [ebp - 0x108], 1
call dword [sym.imp.WS2_32.dll_select]
cmp eax, 0xffffffff
jne 0x5a668e
mov eax, dword [ebp - 0x10c]
mov byte [eax], 1
mov edx, dword [ebx]
mov eax, dword [edx + 0x10]
push str.The_peer_has_closed_the_socket__TCP__connection
mov ecx, ebx
call eax
mov ecx, dword [esi + 0xa4]
push 2
push ecx
call dword [sym.imp.WS2_32.dll_shutdown]
mov edx, dword [esi + 0xa4]
push edx
call dword [sym.imp.WS2_32.dll_closesocket]
pop edi
mov dword [esi + 0xa4], 0xffffffff
mov byte [esi + 0xa0], 0
pop esi
xor al, al
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00521602
mov esp, ebp
pop ebp
ret 0x18
mov ecx, dword [ebp - 4]
test eax, eax
pop edi
setne al
pop esi
xor ecx, ebp
pop ebx
call fcn.00521602
mov esp, ebp
pop ebp
ret 0x18