Function at 0x410620
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x23c
push ebx
push edi
push 0
push 0x80
push 3
push 0
push 0
push 0xc0000000
push dword [ebp + 8]
mov ebx, ecx
mov dword [ebp - 0x28], ebx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
jne 0x41065c
pop edi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 4
push esi
push 2
lea eax, [ebp - 4]
mov dword [ebp - 8], 0
push eax
push 0
push edi
mov dword [ebp - 4], 0
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 8], eax
mov dword [ebp - 8], eax
cmp eax, 0xffffffff
jne 0x41069f
call esi
test eax, eax
je 0x410699
or eax, 0xffffffff
mov dword [ebp - 4], eax
jmp 0x41069c
mov eax, dword [ebp - 8]
mov dword [ebp + 8], eax
push 0
lea eax, [ebp - 4]
mov dword [ebp - 8], 0
push eax
push 0
push edi
mov dword [ebp - 4], 0
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [ebp - 8], eax
cmp eax, 0xffffffff
jne 0x4106c6
call esi
mov eax, dword [ebp + 8]
cmp eax, 0x16
jb 0x410761
xor ecx, ecx
mov dword [ebp - 0x24], 0
lea esi, [eax - 0x16]
mov dword [ebp - 0x20], ecx
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x14], ecx
mov word [ebp - 0x10], cx
mov dword [ebp + 8], esi
push 0
lea eax, [ebp - 0x2c]
mov dword [ebp - 0x30], esi
push eax
push esi
push edi
mov dword [ebp - 0x2c], 0
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [ebp - 0x30], eax
cmp eax, 0xffffffff
jne 0x410717
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0
lea eax, [ebp - 4]
push eax
push 0x16
lea eax, [ebp - 0x24]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push 0x44f890
lea eax, [ebp - 0x24]
mov ecx, ebx
push eax
push eax
call fcn.0041c4f0
cmp dword [ebp - 0x24], 0x6054b50
je 0x410773
xor eax, eax
dec esi
mov word [ebp - 0x1a], ax
cmp esi, dword [ebp + 8]
jbe 0x4106f1
mov esi, dword [sym.imp.KERNEL32.dll_ReadFile]
movzx eax, word [ebp - 0x1a]
mov dword [ebp - 0x34], eax
test eax, eax
jg 0x4107dc
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop esi
pop edi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 4
mov si, word [ebp - 0x10]
test si, si
je 0x410750
push 0x7f
lea eax, [ebp - 0x137]
mov byte [ebp - 0x138], 0
push 0
push eax
call fcn.00424040
add esp, 0xc
movzx eax, si
cmp si, 0x7f
jb 0x4107a4
mov eax, 0x7f
mov esi, dword [sym.imp.KERNEL32.dll_ReadFile]
lea ecx, [ebp - 4]
push 0
push ecx
push eax
mov dword [ebp + 8], eax
lea eax, [ebp - 0x138]
push eax
push edi
call esi
mov eax, dword [ebp + 8]
mov ecx, ebx
mov byte [ebp + eax - 0x138], 0
lea eax, [ebp - 0x138]
push eax
call fcn.00410a80
jmp 0x410756
mov eax, dword [ebp - 0x14]
lea ecx, [ebp - 4]
push 0
push ecx
push eax
push edi
mov dword [ebp - 8], eax
mov dword [ebp - 4], 0
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [ebp - 8], eax
cmp eax, 0xffffffff
jne 0x410805
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0
push dword [ebp - 0x18]
lea ecx, [ebp - 0xb8]
push 0
call fcn.0041c660
mov al, byte [ebx]
lea ecx, [ebp - 0xb8]
and al, 1
movzx eax, al
push eax
call fcn.0041c860
push 0
lea eax, [ebp + 8]
push eax
push dword [ebp - 0x18]
push dword [ebp - 0xb8]
push edi
call esi
push dword [ebp - 0x18]
lea ecx, [ebp - 0xb8]
push 0
call fcn.0041d5c0
xor ebx, ebx
cmp dword [ebp - 0x34], ebx
jle 0x410a4c
mov esi, 0xffff
lea esp, [esp]
push 1
lea eax, [ebp - 0x88]
push eax
lea ecx, [ebp - 0xb8]
call fcn.0040e320
cmp dword [ebp - 0x88], 0x2014b50
jne 0x410a43
mov ax, word [ebp - 0x7e]
test ax, ax
je 0x410897
cmp ax, 0xe
jne 0x410a43
push 0x103
lea eax, [ebp - 0x23b]
mov byte [ebp - 0x23c], 0
push 0
push eax
call fcn.00424040
movzx eax, word [ebp - 0x6c]
add esp, 0xc
mov ecx, 0x103
cmp eax, ecx
cmovb ecx, eax
lea eax, [ebp - 0x23c]
push ecx
push eax
lea ecx, [ebp - 0xb8]
call fcn.0041ccf0
lea eax, [ebp - 0x23c]
push eax
call fcn.0041be90
add esp, 4
mov word [ebp - 0x58], si
lea ecx, [ebp - 0xc]
push 0x43a802
call fcn.0041f5d0
movzx eax, word [ebp - 0xc]
lea ecx, [ebp - 0xa]
mov word [ebp - 0x58], ax
lea eax, [ebp - 0x23c]
push eax
mov dword [ebp - 0x54], 0
mov dword [ebp - 0x50], 0
mov dword [ebp - 0x4c], 0
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x44], 0
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x38], 0
call fcn.0041f5d0
movzx eax, word [ebp - 0xa]
movzx ecx, word [ebp - 0x6a]
add ecx, dword [ebp - 0x5e]
mov esi, dword [ebp - 0x28]
mov word [ebp - 0x58], ax
add esi, 0xc
mov eax, dword [ebp - 0x74]
mov dword [ebp - 0x54], eax
mov eax, dword [ebp - 0x70]
mov dword [ebp - 0x50], eax
mov eax, dword [ebp - 0x78]
mov dword [ebp - 0x44], eax
movzx eax, word [ebp - 0x6c]
add eax, 0x1e
add eax, ecx
mov ecx, esi
mov dword [ebp - 0x3c], eax
movzx eax, word [ebp - 0x7e]
mov dword [ebp - 0x38], eax
lea eax, [ebp + 0xb]
push eax
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x58]
push eax
call fcn.0040f250
mov ecx, esi
call fcn.0040fde0
mov ecx, dword [esi + 4]
mov edx, eax
imul eax, edx, 0x34
add ecx, eax
mov dword [ebp - 4], eax
mov eax, dword [ebp - 0x2c]
mov dword [ecx + 8], eax
mov dword [ecx + 4], 0xffffffff
mov dword [ecx], 0xffffffff
mov dword [ecx + 0xc], 0
cmp eax, 0xffffffff
je 0x4109db
imul ecx, eax, 0x34
cmp byte [ebp + 0xb], 0
mov eax, dword [esi + 4]
je 0x4109d5
mov dword [ecx + eax], edx
jmp 0x4109de
mov dword [ecx + eax + 4], edx
jmp 0x4109de
mov dword [esi + 0x10], edx
push edx
mov ecx, esi
call fcn.0040f640
mov ecx, dword [ebp - 4]
inc dword [esi + 0x14]
add ecx, 0x10
add ecx, dword [esi + 4]
je 0x4109fd
lea eax, [ebp - 0x58]
push eax
call fcn.0040e420
mov eax, dword [ebp - 0x28]
cmp byte [eax + 9], 0
je 0x410a12
movzx ecx, word [ebp - 0x68]
movzx eax, word [ebp - 0x6a]
add ecx, eax
jmp 0x410a14
xor ecx, ecx
push ecx
push 1
lea ecx, [ebp - 0xb8]
call fcn.0041d560
mov eax, dword [ebp - 0x4c]
test eax, eax
je 0x410a32
push eax
call fcn.0040db80
add esp, 4
inc ebx
mov esi, 0xffff
cmp ebx, dword [ebp - 0x34]
jl 0x410860
jmp 0x410a4c
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor edi, edi
cmp dword [ebp - 0xb0], 0
jl 0x410a6d
mov eax, dword [ebp - 0xb8]
test eax, eax
je 0x410a6d
mov ecx, dword [sym.imp.tier0.dll_g_pMemAlloc]
push eax
mov ecx, dword [ecx]
mov edx, dword [ecx]
call dword [edx + 0x14]
pop esi
mov eax, edi
pop edi
pop ebx
mov esp, ebp
pop ebp
ret 4