Function at 0x5b0030
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x600983
mov eax, dword fs:[0]
push eax
sub esp, 0x18
mov eax, dword [0x70f200]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov esi, dword [ebp + 8]
call fcn.005b02b0
push 0
push 0
push 3
push 0
push 1
push SysReAllocString
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
or eax, 0xffffffff
test esi, esi
cmove esi, eax
mov dword [ebp - 0x18], esi
mov dword [ebp - 4], 0
cmp esi, eax
je 0x5b028d
test esi, esi
je 0x5b027d
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0x1e
jb 0x5b027d
push 0
lea eax, [ebp - 0x14]
mov dword [ebp - 0x14], 0
push eax
push 6
push edi
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x5b0274
cmp dword [ebp - 0x14], 6
jb 0x5b0274
cmp word [edi + 2], 1
jne 0x5b0274
movzx eax, word [edi + 4]
test ax, ax
je 0x5b0274
cmp eax, 0x64
ja 0x5b0274
push ecx
push eax
lea ecx, [edi + 8]
call fcn.00404100
movzx eax, word [edi + 4]
xor ecx, ecx
mov dword [ebp - 0x24], ecx
mov edx, eax
mov dword [ebp - 0x1c], ecx
cmp cx, ax
jae 0x5b018e
xor edx, edx
mov dword [ebp - 0x20], edx
nop dword [eax]
lea eax, [ecx + 1]
mov dword [ebp - 0x1c], eax
cmp dword [edi + 8], ecx
ja 0x5b0130
mov dword [edi + 8], eax
jmp 0x5b0133
mov dword [ebp - 0x1c], eax
mov eax, dword [edi + 0x10]
lea ecx, [ebp - 0x14]
push 0
push ecx
push 0x10
add eax, edx
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x5b0274
cmp dword [ebp - 0x14], 0x10
jb 0x5b0274
mov eax, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x1c]
cmp dword [edi + 8], eax
ja 0x5b0168
mov dword [edi + 8], ecx
mov eax, dword [edi + 0x10]
mov edx, dword [ebp - 0x20]
cmp dword [eax + edx + 0xc], 0
je 0x5b0274
movzx eax, word [edi + 4]
add edx, 0x10
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x20], edx
cmp ecx, eax
jb 0x5b0120
movzx edx, word [edi + 4]
lea ecx, [edi + 0x14]
movzx eax, dx
push ecx
push eax
call fcn.00403f30
xor eax, eax
xor ebx, ebx
cmp ax, word [edi + 4]
jae 0x5b0286
xor edx, edx
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x1c], edx
lea eax, [ebx + 1]
mov dword [ebp - 0x20], eax
cmp dword [edi + 8], ebx
ja 0x5b01c1
mov dword [edi + 8], eax
jmp 0x5b01c4
mov dword [ebp - 0x20], eax
mov eax, dword [edi + 0x10]
push 0
push 0
push dword [eax + edx + 0xc]
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x5b0274
mov eax, dword [ebp - 0x20]
cmp dword [edi + 8], ebx
ja 0x5b01ea
mov dword [edi + 8], eax
mov edx, dword [edi + 0x10]
add edx, dword [ebp - 0x1c]
cmp dword [edi + 0x14], ebx
ja 0x5b01f8
mov dword [edi + 0x14], eax
mov ecx, dword [edi + 0x1c]
add ecx, dword [ebp - 0x24]
push 0
push dword [edx + 8]
call fcn.00404190
cmp dword [edi + 8], ebx
ja 0x5b0213
mov eax, dword [ebp - 0x20]
mov dword [edi + 8], eax
mov edx, dword [edi + 0x10]
add edx, dword [ebp - 0x1c]
cmp dword [edi + 0x14], ebx
ja 0x5b0224
lea eax, [ebx + 1]
mov dword [edi + 0x14], eax
mov eax, dword [edi + 0x1c]
lea ecx, [ebp - 0x14]
add eax, dword [ebp - 0x24]
push 0
push ecx
push dword [edx + 8]
push dword [eax + 8]
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x5b0274
cmp dword [edi + 8], ebx
ja 0x5b024c
lea eax, [ebx + 1]
mov dword [edi + 8], eax
mov ecx, dword [edi + 0x10]
mov edx, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x14]
cmp eax, dword [ecx + edx + 8]
jb 0x5b0274
movzx eax, word [edi + 4]
inc ebx
add dword [ebp - 0x24], 0xc
add edx, 0x10
mov dword [ebp - 0x1c], edx
cmp ebx, eax
jb 0x5b01b1
jmp 0x5b0286
mov ecx, edi
call fcn.005b02b0
mov edi, eax
cmp esi, 0xffffffff
je 0x5b028d
test esi, esi
je 0x5b028d
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0041e1b5
mov esp, ebp
pop ebp
ret 4