Function at 0x5bc5a0
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 0x5bc7fd
cmp dword [esp + 0x10], ebp
jne 0x5bc7fd
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 0x5bc698
test ebx, ebx
jne 0x5bc698
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 0x5bc689
cmp dword [esp + 0x10], ebp
jne 0x5bc689
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.005e7a50
add edi, eax
adc ebx, edx
test ebx, ebx
jg 0x5bc684
jl 0x5bc675
cmp edi, 0x10
jae 0x5bc684
pop edi
pop esi
pop ebp
mov eax, 0xfffffffa
pop ebx
add esp, 0x1c
ret 8
add edi, 0xfffffff0
jmp 0x5bc6ce
pop edi
pop esi
pop ebp
mov eax, 0xfffffffb
pop ebx
add esp, 0x1c
ret 8
test edi, edi
jne 0x5bc6b2
test ebx, ebx
jne 0x5bc6b4
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 0x5bc6d1
test ebx, ebx
jg 0x5bc6cb
jl 0x5bc6bc
cmp edi, ebp
jae 0x5bc6cb
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, str.sidx
mov edx, dword [ecx]
mov ecx, dword [eax]
cmp edx, ecx
jne 0x5bc79c
mov ecx, dword [esp + 0x34]
xor eax, eax
cmp ebx, eax
jl 0x5bc705
jg 0x5bc6f6
cmp edi, ecx
jbe 0x5bc705
pop edi
pop esi
pop ebp
mov eax, 0xfffffff8
pop ebx
add esp, 0x1c
ret 8
test ebx, ebx
jg 0x5bc71f
jl 0x5bc710
cmp edi, 0x18
jae 0x5bc71f
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 0x5bc78d
mov eax, dword [esp + 0x10]
cmp eax, edi
jne 0x5bc78d
push eax
push ebp
mov ecx, esi
call fcn.005bc810
cmp eax, 1
jne 0x5bc802
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 0x5bc7de
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x5bc7de
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