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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xb4
push ebx
push esi
xor ebx, ebx
push edi
push ebx
mov dword [ebp - 0x10], ecx
push dword [ebp + 0x14]
mov word [ebp - 0x22], bx
mov dword [ebp - 0x1c], ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
sub esi, 0x16
je 0x413732
mov edi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push ebx
push ebx
push esi
push dword [ebp + 0x14]
call edi
lea eax, [ebp - 0xc]
push ebx
push eax
lea eax, [ebp - 8]
push 4
push eax
push dword [ebp + 0x14]
mov dword [ebp - 8], ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [ebp - 8], 0x6054b50
je 0x4136f2
dec esi
jne 0x4136bf
jmp 0x413738
push ebx
push ebx
push esi
push dword [ebp + 0x14]
call edi
lea eax, [ebp - 0xc]
push ebx
push eax
lea eax, [ebp - 0x2c]
push 0x16
push eax
push dword [ebp + 0x14]
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp word [ebp - 0x28], bx
jne 0x413954
cmp word [ebp - 0x26], bx
jne 0x413954
mov ax, word [ebp - 0x24]
cmp ax, word [ebp - 0x22]
jne 0x413954
jmp 0x413738
mov edi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push ebx
push ebx
push dword [ebp - 0x1c]
push dword [ebp + 0x14]
call edi
cmp word [ebp - 0x22], bx
mov dword [ebp - 8], ebx
jbe 0x41391c
lea eax, [ebp - 0xc]
push ebx
push eax
lea eax, [ebp - 0x5c]
push 0x2e
push eax
push dword [ebp + 0x14]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x413954
cmp dword [ebp - 0xc], 0x2e
jne 0x413954
cmp dword [ebp - 0x48], ebx
je 0x4138f3
movzx eax, word [ebp - 0x40]
inc eax
push eax
call fcn.00414e25
pop ecx
mov esi, eax
lea eax, [ebp - 0xc]
push ebx
push eax
mov dword [ebp - 0x14], esi
movzx eax, word [ebp - 0x40]
push eax
push esi
push dword [ebp + 0x14]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x41394d
movzx eax, word [ebp - 0x40]
cmp dword [ebp - 0xc], eax
jne 0x41394d
push esi
lea ecx, [ebp - 4]
mov byte [eax + esi], bl
call fcn.0040168c
lea ecx, [ebp - 4]
call fcn.0040ad94
lea ecx, [ebp - 4]
call fcn.0040917d
mov esi, eax
dec esi
test eax, eax
mov eax, dword [ebp - 4]
je 0x41381b
cmp eax, ebx
lea ecx, [ebp - 4]
je 0x4137f1
call fcn.00408ccd
mov eax, dword [ebp - 4]
lea ecx, [esi + eax + 0xd]
cmp byte [ecx], 0x2f
jne 0x413814
cmp eax, ebx
jne 0x4137ff
lea eax, [ebp - 4]
jmp 0x41380e
lea ecx, [ebp - 4]
call fcn.00408ccd
mov eax, dword [ebp - 4]
lea eax, [esi + eax + 0xd]
mov byte [eax], 0x5c
mov eax, dword [ebp - 4]
mov ecx, esi
dec esi
test ecx, ecx
jne 0x4137de
mov ecx, dword [ebp - 0x50]
mov dword [ebp - 0x68], ecx
mov ecx, dword [ebp - 0x48]
mov dword [ebp - 0x70], ecx
mov ecx, dword [ebp - 0x44]
mov dword [ebp - 0x6c], ecx
mov ecx, dword [ebp - 0x32]
mov dword [ebp - 0x64], ecx
mov cl, byte [ebp - 0x54]
and cl, 1
mov byte [ebp - 0x60], cl
movzx ecx, word [ebp - 0x52]
cmp ecx, ebx
je 0x413856
cmp ecx, 8
jne 0x4138cd
mov dword [ebp - 0x74], 1
jmp 0x413859
mov dword [ebp - 0x74], ebx
cmp eax, ebx
mov dword [ebp - 0x90], eax
je 0x413866
inc dword [eax + 4]
push 6
lea esi, [ebp - 0x74]
pop ecx
lea edi, [ebp - 0x8c]
rep movsd dword es:[edi], dword [esi]
mov eax, dword [ebp - 0x90]
cmp eax, ebx
mov dword [ebp - 0xac], eax
je 0x413887
inc dword [eax + 4]
push 6
lea eax, [ebp - 0xac]
pop ecx
lea esi, [ebp - 0x8c]
push eax
lea eax, [ebp - 0xb4]
lea edi, [ebp - 0xa8]
push eax
mov eax, dword [ebp - 0x10]
rep movsd dword es:[edi], dword [esi]
lea ecx, [eax + 0x24]
call fcn.00413fe7
lea ecx, [ebp - 0xac]
call fcn.0040178c
lea ecx, [ebp - 0x90]
call fcn.0040178c
mov edi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push dword [ebp - 0x14]
call fcn.004148d0
movzx eax, word [ebp - 0x3c]
pop ecx
movzx ecx, word [ebp - 0x3e]
push 1
add eax, ecx
push ebx
push eax
push dword [ebp + 0x14]
call edi
lea ecx, [ebp - 4]
call fcn.0040178c
jmp 0x41390c
movzx eax, word [ebp - 0x3c]
movzx ecx, word [ebp - 0x3e]
add eax, ecx
push 1
movzx ecx, word [ebp - 0x40]
add eax, ecx
push ebx
push eax
push dword [ebp + 0x14]
call edi
movzx eax, word [ebp - 0x22]
inc dword [ebp - 8]
cmp dword [ebp - 8], eax
jl 0x41374f
mov esi, dword [ebp - 0x10]
mov eax, dword [ebp + 0x14]
mov dword [esi + 8], eax
mov ecx, dword [0x42de78]
cmp ecx, ebx
jne 0x413969
push 0x10
call fcn.00414e25
cmp eax, ebx
pop ecx
je 0x413961
mov cl, byte [ebp + 0x17]
mov dword [eax + 4], ebx
mov byte [eax], cl
mov dword [eax + 8], ebx
mov dword [eax + 0xc], ebx
mov ecx, eax
jmp 0x413963
push esi
call fcn.004148d0
pop ecx
push dword [ebp + 0x14]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
jmp 0x413977
xor ecx, ecx
mov dword [0x42de78], ecx
lea eax, [ebp + 0x14]
mov dword [ebp + 0x14], esi
push eax
call fcn.0040f5a6
mov al, 1
pop edi
pop esi
pop ebx
leave
ret 0x14