Function at 0x5f3440
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x2034
call fcn.006ab750
mov eax, dword [ebp + 0xc]
push ebx
push esi
push edi
push 0
push 0x80
push 3
push 0
push 3
push SysReAllocStringLen
push eax
mov byte [esp + 0x2b], 3
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
mov dword [esp + 0x10], edi
je 0x5f38e6
mov esi, dword [sym.imp.KERNEL32.dll_ReadFile]
push 0
lea ecx, [esp + 0x24]
push ecx
push 0xc
lea edx, [esp + 0x40]
push edx
push edi
call esi
cmp dword [esp + 0x20], 0xc
jne 0x5f38eb
mov ebx, dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
jmp 0x5f34b0
cmp dword [esp + 0x34], 0x46464952
jne 0x5f34c4
cmp dword [esp + 0x3c], 0x45564157
je 0x5f3501
mov eax, dword [esp + 0x38]
add eax, 1
and eax, 0xfffffffe
cmp eax, 4
jle 0x5f38eb
push 1
sub eax, 4
cdq
push 0
push edx
push eax
push edi
call ebx
push 0
lea eax, [esp + 0x24]
push eax
push 0xc
lea ecx, [esp + 0x40]
push ecx
push edi
call esi
cmp dword [esp + 0x20], 0xc
je 0x5f34b0
jmp 0x5f38eb
push 0
lea edx, [esp + 0x20]
push edx
push 8
lea eax, [esp + 0x38]
push eax
push edi
call esi
cmp dword [esp + 0x1c], 8
jne 0x5f38eb
cmp dword [esp + 0x2c], 0x20746d66
mov ecx, dword [esp + 0x30]
mov dword [esp + 0x14], ecx
je 0x5f3562
lea eax, [ecx + 1]
and eax, 0xfffffffe
jl 0x5f38eb
push 1
cdq
push 0
push edx
push eax
push edi
call ebx
push 0
lea ecx, [esp + 0x20]
push ecx
push 8
lea edx, [esp + 0x38]
push edx
push edi
call esi
cmp dword [esp + 0x1c], 8
je 0x5f351d
jmp 0x5f38eb
cmp ecx, 0x2000
ja 0x5f38eb
cmp ecx, 0x10
jb 0x5f38eb
lea eax, [esp + 0x10]
push eax
lea edx, [esp + 0x44]
call fcn.004020f0
mov ebx, dword [esp + 0x14]
cmp eax, ebx
jne 0x5f38eb
cmp word [esp + 0x40], 0xfffe
jne 0x5f3636
cmp word [esp + 0x50], 0x16
jb 0x5f3636
mov eax, 0x714a50
lea ecx, [esp + 0x58]
call fcn.00401050
test eax, eax
je 0x5f35c5
mov word [esp + 0x40], 1
jmp 0x5f362f
mov eax, 0x714a60
lea ecx, [esp + 0x58]
call fcn.00401050
test eax, eax
je 0x5f35e0
mov word [esp + 0x40], 3
jmp 0x5f362f
mov eax, 0x714a70
lea ecx, [esp + 0x58]
call fcn.00401050
test eax, eax
je 0x5f35fb
mov word [esp + 0x40], 6
jmp 0x5f362f
mov eax, 0x714a80
lea ecx, [esp + 0x58]
call fcn.00401050
test eax, eax
je 0x5f3616
mov word [esp + 0x40], 7
jmp 0x5f362f
mov eax, 0x714a90
lea ecx, [esp + 0x58]
call fcn.00401050
test eax, eax
je 0x5f362f
mov word [esp + 0x40], 2
mov word [esp + 0x50], 0
cmp ebx, 0x12
jae 0x5f3642
mov word [esp + 0x50], 0
push 0
lea ecx, [esp + 0x18]
push ecx
push 8
lea edx, [esp + 0x30]
push edx
push edi
call esi
cmp dword [esp + 0x14], 8
jne 0x5f38eb
mov edi, edi
cmp dword [esp + 0x24], 0x61746164
mov eax, dword [esp + 0x28]
mov ebx, eax
je 0x5f36a3
add eax, 1
and eax, 0xfffffffe
jl 0x5f38eb
lea ecx, [esp + 0x10]
push ecx
call fcn.00496fb0
push 0
lea edx, [esp + 0x18]
push edx
push 8
lea eax, [esp + 0x30]
push eax
push edi
call esi
cmp dword [esp + 0x14], 8
je 0x5f3660
jmp 0x5f38eb
mov ax, word [esp + 0x42]
test ax, ax
jbe 0x5f38eb
cmp ax, 0xff
ja 0x5f38eb
mov eax, dword [esp + 0x44]
test eax, eax
jbe 0x5f38eb
cmp eax, 0x2fda0
ja 0x5f38eb
mov ax, word [esp + 0x40]
cmp ax, 1
jne 0x5f376d
mov ax, word [esp + 0x4e]
cmp ax, 0x10
ja 0x5f384c
cmp ax, 8
push 0x32
ja 0x5f373a
call fcn.004aefd0
add esp, 4
test eax, eax
je 0x5f372b
mov ecx, dword [esp + 0x44]
push ecx
mov cl, byte [esp + 0x46]
lea edx, [esp + 0x14]
push edx
push eax
mov eax, ebx
call fcn.005f90b0
mov esi, dword [ebp + 8]
mov edi, dword [esp + 0x10]
call fcn.005ebdb0
jmp 0x5f391b
mov esi, dword [ebp + 8]
xor eax, eax
call fcn.005ebdb0
jmp 0x5f391b
call fcn.004aefd0
add esp, 4
test eax, eax
je 0x5f372b
mov ecx, dword [esp + 0x44]
push ecx
mov cl, byte [esp + 0x46]
lea edx, [esp + 0x14]
push edx
push eax
mov eax, ebx
call fcn.005f91f0
mov esi, dword [ebp + 8]
mov edi, dword [esp + 0x10]
call fcn.005ebdb0
jmp 0x5f391b
cmp ax, 0x22
jne 0x5f37be
push 0x1a
call fcn.004aefd0
add esp, 4
test eax, eax
je 0x5f37a2
push 7
call fcn.005ebc50
mov esi, dword [ebp + 8]
call fcn.005ebdb0
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov esi, dword [ebp + 8]
xor eax, eax
call fcn.005ebdb0
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
cmp ax, 0x45
je 0x5f3773
cmp ax, 6
jne 0x5f3803
push 0x32
call fcn.004aefd0
add esp, 4
test eax, eax
je 0x5f372b
mov ecx, dword [esp + 0x44]
push ecx
mov cl, byte [esp + 0x46]
lea edx, [esp + 0x14]
push edx
push eax
mov eax, ebx
call fcn.005f7810
mov esi, dword [ebp + 8]
mov edi, dword [esp + 0x10]
call fcn.005ebdb0
jmp 0x5f391b
cmp ax, 7
jne 0x5f3842
push 0x32
call fcn.004aefd0
add esp, 4
test eax, eax
je 0x5f372b
mov ecx, dword [esp + 0x44]
push ecx
mov cl, byte [esp + 0x46]
lea edx, [esp + 0x14]
push edx
push eax
mov eax, ebx
call fcn.005f7950
mov esi, dword [ebp + 8]
mov edi, dword [esp + 0x10]
call fcn.005ebdb0
jmp 0x5f391b
cmp ax, 0x270
je 0x5f3773
push 0x9c
call fcn.004aefd0
mov esi, eax
add esp, 4
test esi, esi
je 0x5f3874
push ebx
lea eax, [esp + 0x14]
push eax
lea eax, [esp + 0x48]
call fcn.005f2c50
mov edi, dword [esp + 0x10]
jmp 0x5f3876
xor eax, eax
lea esi, [esp + 0x18]
call fcn.005ebdb0
mov eax, esi
call fcn.004052e0
test al, al
jne 0x5f389f
mov eax, esi
mov esi, dword [ebp + 8]
call fcn.005ebd80
lea ecx, [esp + 0x18]
call fcn.005ebde0
jmp 0x5f391b
lea ecx, [esp + 0x18]
call fcn.005ebde0
cmp word [esp + 0x40], 0x55
jne 0x5f38df
push 0x2257
call fcn.004aefd0
add esp, 4
test eax, eax
je 0x5f372b
lea ecx, [esp + 0x10]
push ecx
mov esi, eax
call fcn.005e4e80
mov esi, dword [ebp + 8]
mov edi, dword [esp + 0x10]
call fcn.005ebdb0
jmp 0x5f391b
mov byte [esp + 0xf], 5
jmp 0x5f38eb
mov byte [esp + 0xf], 4
push 0x1a
call fcn.0069e704
add esp, 4
test eax, eax
jne 0x5f3932
call fcn.004b05b0
mov eax, dword [0x73658c]
test eax, eax
jne 0x5f390c
call fcn.005ebef0
mov esi, dword [ebp + 8]
mov dword [esi], eax
mov ecx, dword [eax + 0xe]
push ecx
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
cmp edi, 0xffffffff
je 0x5f3927
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
fld dword [0x7238c8]
mov dl, byte [esp + 0xf]
lea ecx, [eax + 0x15]
mov dword [eax], 0x714290
and ecx, 0xfffffffc
mov dword [eax + 0xe], ecx
mov dword [ecx], 0
fstp dword [eax + 9]
mov dword [eax + 4], 0x2b11
mov byte [eax + 8], 1
mov dword [eax], 0x7142b0
mov byte [eax + 0xd], dl
jmp 0x5f390c