Function at 0x5bd740
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 0x5bd99d
cmp dword [esp + 0x10], ebp
jne 0x5bd99d
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 0x5bd838
test ebx, ebx
jne 0x5bd838
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 0x5bd829
cmp dword [esp + 0x10], ebp
jne 0x5bd829
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.005e8c50
add edi, eax
adc ebx, edx
test ebx, ebx
jg 0x5bd824
jl 0x5bd815
cmp edi, 0x10
jae 0x5bd824
pop edi
pop esi
pop ebp
mov eax, 0xfffffffa
pop ebx
add esp, 0x1c
ret 8
add edi, 0xfffffff0
jmp 0x5bd86e
pop edi
pop esi
pop ebp
mov eax, 0xfffffffb
pop ebx
add esp, 0x1c
ret 8
test edi, edi
jne 0x5bd852
test ebx, ebx
jne 0x5bd854
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 0x5bd871
test ebx, ebx
jg 0x5bd86b
jl 0x5bd85c
cmp edi, ebp
jae 0x5bd86b
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 0x5bd93c
mov ecx, dword [esp + 0x34]
xor eax, eax
cmp ebx, eax
jl 0x5bd8a5
jg 0x5bd896
cmp edi, ecx
jbe 0x5bd8a5
pop edi
pop esi
pop ebp
mov eax, 0xfffffff8
pop ebx
add esp, 0x1c
ret 8
test ebx, ebx
jg 0x5bd8bf
jl 0x5bd8b0
cmp edi, 0x18
jae 0x5bd8bf
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 0x5bd92d
mov eax, dword [esp + 0x10]
cmp eax, edi
jne 0x5bd92d
push eax
push ebp
mov ecx, esi
call fcn.005bd9b0
cmp eax, 1
jne 0x5bd9a2
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 0x5bd97e
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x5bd97e
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