Function at 0x520130
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x59c8a8
mov eax, dword fs:[0]
push eax
sub esp, 0x6c
mov eax, dword [0x60b4e0]
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 ebx, dword [ebp + 8]
mov eax, dword [ebp + 0xc]
test ebx, ebx
jne 0x52016d
lea eax, [ebx + 0xd]
jmp 0x520390
push 0x5a3ec4
push eax
lea eax, [ebp - 0x48]
mov dword [ebp - 0x48], 0
push eax
mov esi, 4
call fcn.00566c76
mov eax, dword [ebp - 0x48]
add esp, 0xc
test eax, eax
je 0x52038e
push eax
push 1
lea eax, [ebp - 0x14]
push 2
push eax
call fcn.0056aaa6
mov ax, word [ebp - 0x14]
add esp, 0x10
cmp al, 0xff
jne 0x520368
cmp ah, 0xfe
jne 0x520368
push 2
push 0
push dword [ebp - 0x48]
call fcn.0056ae91
push dword [ebp - 0x48]
call fcn.0056b403
push 0
push 2
push dword [ebp - 0x48]
lea edi, [eax - 2]
call fcn.0056ae91
push edi
call fcn.00525ad5
push dword [ebp - 0x48]
mov esi, eax
push 1
push edi
push esi
call fcn.0056aaa6
xor eax, eax
mov dword [ebp - 0x34], 0
mov word [ebp - 0x44], ax
lea ecx, [ebp - 0x44]
mov eax, edi
mov dword [ebp - 0x30], 7
cdq
add esp, 0x30
sub eax, edx
sar eax, 1
push eax
push esi
call fcn.00404870
push esi
mov dword [ebp - 4], 0
call fcn.00525ad0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 0xf
mov byte [ebp - 0x2c], 0
cmp dword [ebp - 0x30], 8
lea ecx, [ebp - 0x2c]
lea eax, [ebp - 0x44]
mov byte [ebp - 4], 1
cmovae eax, dword [ebp - 0x44]
push ecx
push eax
call fcn.0044f760
add esp, 0xc
mov dword [ebp - 0x50], 0
lea ecx, [ebp - 0x60]
mov dword [ebp - 0x4c], 0xf
mov byte [ebp - 0x60], 0
push 0x5cbb84
call fcn.0044e970
push 0
lea eax, [ebp - 0x60]
mov byte [ebp - 4], 2
push eax
lea eax, [ebp - 0x2c]
push eax
call fcn.004366d0
add esp, 0xc
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x60]
mov esi, eax
call fcn.00404adb
cmp esi, 0xffffffff
je 0x52033f
push 0x5cbb8c
lea ecx, [ebp - 0x78]
mov dword [ebp - 0x68], 0
mov dword [ebp - 0x64], 0xf
mov byte [ebp - 0x78], 0
call fcn.0044e970
push 0x5cbb84
lea ecx, [ebp - 0x60]
mov byte [ebp - 4], 3
mov dword [ebp - 0x50], 0
mov dword [ebp - 0x4c], 0xf
mov byte [ebp - 0x60], 0
call fcn.0044e970
cmp dword [ebp - 0x50], 0
mov byte [ebp - 4], 4
je 0x52032b
mov edi, dword [ebp - 0x68]
xor esi, esi
push esi
lea eax, [ebp - 0x60]
push eax
lea eax, [ebp - 0x2c]
push eax
call fcn.004366d0
mov esi, eax
add esp, 0xc
cmp esi, 0xffffffff
je 0x52032b
cmp dword [ebp - 0x64], 0x10
lea eax, [ebp - 0x78]
push edi
cmovae eax, dword [ebp - 0x78]
lea ecx, [ebp - 0x2c]
push eax
push dword [ebp - 0x50]
push esi
call fcn.00521520
mov edi, dword [ebp - 0x68]
add esi, edi
jmp 0x5202f3
lea ecx, [ebp - 0x60]
call fcn.00404adb
lea ecx, [ebp - 0x78]
mov byte [ebp - 4], 1
call fcn.00404adb
cmp dword [ebp - 0x18], 0x10
lea eax, [ebp - 0x2c]
push 0xffffffffffffffff
cmovae eax, dword [ebp - 0x2c]
mov ecx, ebx
push eax
call fcn.00439f10
lea ecx, [ebp - 0x2c]
mov esi, eax
call fcn.00404adb
lea ecx, [ebp - 0x44]
call fcn.004047a9
jmp 0x520383
push 0
push 0
push dword [ebp - 0x48]
call fcn.0056ae91
add esp, 0xc
mov ecx, ebx
push dword [ebp - 0x48]
call fcn.00439b30
mov esi, eax
push dword [ebp - 0x48]
call fcn.00566d33
add esp, 4
mov eax, esi
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.0055a658
mov esp, ebp
pop ebp
ret