Function at 0x5b5950
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x1c
push ebx
push ebp
push esi
push edi
xor edi, edi
mov esi, ecx
lea eax, [esp + 0x10]
push edi
mov edx, dword [esi + 0x28]
mov ebp, 8
push eax
lea ecx, [esp + 0x24]
push ebp
push ecx
push edx
mov dword [esp + 0x24], edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x5b5bad
cmp dword [esp + 0x10], ebp
jne 0x5b5bad
mov ebx, dword [esi + 0x30]
mov eax, dword [esp + 0x1c]
add ebx, ebp
push eax
mov dword [esi + 0x30], ebx
mov edx, dword [esi + 0x34]
adc edx, edi
mov dword [esi + 0x34], edx
call sub.WS2_32.dll_ntohl
cdq
mov edi, eax
mov ebx, edx
cmp edi, 1
jne 0x5b5a48
test ebx, ebx
jne 0x5b5a48
mov eax, dword [esi + 0x28]
lea ecx, [esp + 0x10]
push edx
push ecx
lea edx, [esp + 0x1c]
push ebp
push edx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x5b5a39
cmp dword [esp + 0x10], ebp
jne 0x5b5a39
mov ebx, dword [esi + 0x30]
mov ecx, dword [esp + 0x14]
add ebx, ebp
push ecx
mov dword [esi + 0x30], ebx
mov edi, dword [esi + 0x34]
adc edi, 0
mov dword [esi + 0x34], edi
call sub.WS2_32.dll_ntohl
mov edx, dword [esp + 0x18]
mov ebp, eax
push edx
call sub.WS2_32.dll_ntohl
cdq
mov edi, eax
mov eax, ebp
mov ebx, edx
push 1
cdq
push 0
push edx
push eax
call fcn.005e09d0
add edi, eax
adc ebx, edx
test ebx, ebx
jg 0x5b5a34
jl 0x5b5a25
cmp edi, 0x10
jae 0x5b5a34
pop edi
pop esi
pop ebp
mov eax, 0xfffffffa
pop ebx
add esp, 0x1c
ret 8
add edi, 0xfffffff0
jmp 0x5b5a7e
pop edi
pop esi
pop ebp
mov eax, 0xfffffffb
pop ebx
add esp, 0x1c
ret 8
test edi, edi
jne 0x5b5a62
test ebx, ebx
jne 0x5b5a64
mov edi, dword [esi + 0x20]
mov ecx, dword [esi + 0x30]
mov ebx, dword [esi + 0x24]
mov eax, dword [esi + 0x34]
sub edi, ecx
sbb ebx, eax
jmp 0x5b5a81
test ebx, ebx
jg 0x5b5a7b
jl 0x5b5a6c
cmp edi, ebp
jae 0x5b5a7b
pop edi
pop esi
pop ebp
mov eax, 0xfffffff9
pop ebx
add esp, 0x1c
ret 8
add edi, 0xfffffff8
adc ebx, 0xffffffff
lea ecx, [esp + 0x20]
mov eax, 0x6de260
mov edx, dword [ecx]
mov ecx, dword [eax]
cmp edx, ecx
jne 0x5b5b4c
mov ecx, dword [esp + 0x34]
xor eax, eax
cmp ebx, eax
jl 0x5b5ab5
jg 0x5b5aa6
cmp edi, ecx
jbe 0x5b5ab5
pop edi
pop esi
pop ebp
mov eax, 0xfffffff8
pop ebx
add esp, 0x1c
ret 8
test ebx, ebx
jg 0x5b5acf
jl 0x5b5ac0
cmp edi, 0x18
jae 0x5b5acf
pop edi
pop esi
pop ebp
mov eax, 0xfffffff4
pop ebx
add esp, 0x1c
ret 8
mov ebp, dword [esp + 0x30]
mov ecx, dword [esi + 0x28]
lea eax, [esp + 0x10]
push 0
push eax
push edi
push ebp
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x5b5b3d
mov eax, dword [esp + 0x10]
cmp eax, edi
jne 0x5b5b3d
push eax
push ebp
mov ecx, esi
call fcn.005b5bc0
cmp eax, 1
jne 0x5b5bb2
mov edx, dword [esi + 0x30]
mov ecx, dword [esi + 0x34]
mov ebp, dword [esi + 0x10]
add edx, edi
adc ecx, ebx
add ebp, edx
mov edi, dword [esi + 0x18]
mov dword [esi + 0x10], ebp
mov ebx, dword [esi + 0x14]
adc ebx, ecx
mov dword [esi + 0x14], ebx
mov edx, dword [esi + 0x10]
add edi, edx
mov ecx, ebx
mov dword [esi + 0x18], edi
mov edx, dword [esi + 0x1c]
adc edx, ecx
pop edi
mov dword [esi + 0x1c], edx
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret 8
pop edi
pop esi
pop ebp
mov eax, 0xfffffff7
pop ebx
add esp, 0x1c
ret 8
mov eax, dword [esi + 0x30]
mov edx, dword [esi + 0x34]
add eax, edi
lea ecx, [esp + 0x28]
adc edx, ebx
push 0
mov dword [esp + 0x2c], edx
mov edx, dword [esi + 0x28]
push ecx
push eax
push edx
mov dword [esp + 0x34], eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x5b5b8e
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x5b5b8e
pop edi
pop esi
pop ebp
mov eax, 0xfffffff6
pop ebx
add esp, 0x1c
ret 8
mov ecx, dword [esi + 0x30]
add ecx, edi
pop edi
mov dword [esi + 0x30], ecx
mov eax, dword [esi + 0x34]
adc eax, ebx
mov dword [esi + 0x34], eax
pop esi
pop ebp
mov eax, 0xfffffff5
pop ebx
add esp, 0x1c
ret 8
mov eax, 0xfffffffc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret 8