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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x58
mov eax, dword [ebp + 8]
push eax
call fcn.00405ba0
add esp, 4
cmp eax, 1
jne 0x40677e
xor eax, eax
jmp 0x406b32
lea ecx, [ebp - 8]
push ecx
push 0x47dcf0
call fcn.0040da40
add esp, 8
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x406b30
mov dword [ebp - 0xc], 0
mov dword [ebp - 0x10], 0
lea edx, [ebp - 0x10]
push edx
lea eax, [ebp - 0xc]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.00405c50
add esp, 0xc
cmp eax, 1
jne 0x406b26
push 0xfffe
push 0x40
call dword [0x4893ec]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
je 0x406b06
mov edx, dword [ebp - 0x10]
push edx
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
push 0x431cd8
mov ecx, dword [ebp - 0x14]
push ecx
call dword [0x489798]
xor edx, edx
mov word [eax], dx
mov dword [ebp - 0x18], 0xffffffff
push 0
push 0
push 3
push 0
push 3
push SysReAllocString
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0xffffffff
je 0x406afc
push 0
mov ecx, dword [ebp - 0x18]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0xffffffff
je 0x406aec
mov edx, dword [ebp - 0x1c]
push edx
push 0x40
call dword [0x4893ec]
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
je 0x406aec
push 0
lea eax, [ebp - 0x24]
push eax
mov ecx, dword [ebp - 0x1c]
push ecx
mov edx, dword [ebp - 0x20]
push edx
mov eax, dword [ebp - 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, dword [ebp - 0x24]
cmp ecx, dword [ebp - 0x1c]
jne 0x406ae2
mov edx, dword [ebp - 0x18]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x18], 0xffffffff
mov eax, dword [ebp - 0x1c]
shr eax, 5
mov dword [ebp - 0x40], eax
mov eax, dword [ebp - 0x1c]
xor edx, edx
mov ecx, 0x20
div ecx
mov dword [ebp - 0x2c], edx
mov edx, dword [0x47fa80]
mov dword [ebp - 0x38], edx
mov eax, dword [0x47fa84]
mov dword [ebp - 0x34], eax
mov ecx, dword [ebp - 0x20]
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x44], 0
jmp 0x4068d8
mov edx, dword [ebp - 0x44]
add edx, 1
mov dword [ebp - 0x44], edx
mov eax, dword [ebp - 0x44]
cmp eax, dword [ebp - 0x40]
jge 0x40691a
mov ecx, dword [ebp - 0x34]
push ecx
mov edx, dword [ebp - 0x38]
push edx
push 0x47fa5c
push 0
push 0x20
mov eax, dword [ebp - 0x28]
push eax
call fcn.0041a1f0
add esp, 0x18
mov ecx, dword [ebp - 0x28]
add ecx, 0x20
mov dword [ebp - 0x28], ecx
mov edx, dword [ebp - 0x38]
add edx, 1
mov eax, dword [ebp - 0x34]
adc eax, 0
mov dword [ebp - 0x38], edx
mov dword [ebp - 0x34], eax
jmp 0x4068cf
mov ecx, dword [ebp - 0x20]
push ecx
call fcn.0041cde0
add esp, 4
mov dword [ebp - 0x3c], eax
cmp dword [ebp - 0x3c], 0
je 0x406ae2
push 0x65
mov edx, dword [ebp - 0x3c]
push edx
call fcn.00406de0
add esp, 8
mov dword [ebp - 0x48], eax
cmp dword [ebp - 0x48], 0
je 0x406aab
push 0x30010
push 0x40
call dword [0x4893ec]
mov dword [ebp - 0x4c], eax
cmp dword [ebp - 0x4c], 0
je 0x406aab
push 0x86a8
push 0x40
call dword [0x4893ec]
mov dword [ebp - 0x50], eax
cmp dword [ebp - 0x50], 0
je 0x406aa1
push 0x86a8
push 0x47dcf0
mov eax, dword [ebp - 0x50]
push eax
call fcn.00422a00
add esp, 0xc
mov ecx, dword [ebp - 4]
push ecx
mov edx, dword [ebp - 0x4c]
push edx
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
mov eax, dword [ebp - 0xc]
push eax
mov ecx, dword [ebp - 0x4c]
add ecx, 0x10000
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
mov edx, dword [ebp - 0x10]
push edx
mov eax, dword [ebp - 0x4c]
add eax, 0x20000
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
mov ecx, dword [ebp - 0x4c]
mov edx, dword [ebp - 0x20]
mov dword [ecx + 0x30000], edx
mov eax, dword [ebp - 0x4c]
mov ecx, dword [ebp - 0x1c]
mov dword [eax + 0x30004], ecx
mov edx, dword [ebp - 0x4c]
mov eax, dword [ebp - 0x50]
mov dword [edx + 0x30008], eax
mov ecx, dword [ebp - 0x4c]
mov dword [ecx + 0x3000c], 0x4725a0
mov edx, dword [ebp - 0x4c]
push edx
call dword [ebp - 0x48]
cmp eax, 1
jne 0x406a97
mov dword [ebp - 0x54], 0
jmp 0x406a20
mov eax, dword [ebp - 0x54]
add eax, 1
mov dword [ebp - 0x54], eax
cmp dword [ebp - 0x54], 0x1d
jge 0x406a97
mov ecx, dword [ebp - 0x54]
imul ecx, ecx, 0x650
mov edx, dword [ecx + 0x4725a0]
cmp edx, dword [ebp + 8]
jne 0x406a95
mov eax, dword [ebp - 0x54]
imul eax, eax, 0x650
mov ecx, dword [ebp - 0x3c]
mov dword [eax + 0x4725a8], ecx
cmp dword [ebp + 8], 0x15
jne 0x406a65
mov edx, dword [ebp - 0x54]
imul edx, edx, 0x650
mov dword [edx + 0x4725ac], 1
mov eax, dword [ebp - 4]
push eax
call dword [0x4893f8]
mov ecx, dword [ebp - 0xc]
push ecx
call dword [0x4893f8]
mov edx, dword [ebp - 0x10]
push edx
call dword [0x4893f8]
mov eax, dword [ebp - 0x14]
push eax
call dword [0x4893f8]
mov eax, dword [ebp - 0x3c]
jmp 0x406b32
jmp 0x406a17
mov ecx, dword [ebp - 0x50]
push ecx
call dword [0x4893f8]
mov edx, dword [ebp - 0x4c]
push edx
call dword [0x4893f8]
cmp dword [ebp - 0x3c], 0
je 0x406ae2
mov eax, dword [ebp - 0x3c]
push eax
call fcn.00406d60
add esp, 4
mov dword [ebp - 0x58], eax
cmp dword [ebp - 0x58], 0
je 0x406ae2
push 0
push 0
mov ecx, dword [ebp - 0x3c]
push ecx
call dword [ebp - 0x58]
push 0x8000
push 0
mov edx, dword [ebp - 0x3c]
push edx
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov eax, dword [ebp - 0x20]
push eax
call dword [0x4893f8]
cmp dword [ebp - 0x18], 0xffffffff
je 0x406afc
mov ecx, dword [ebp - 0x18]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 0x14]
push edx
call dword [0x4893f8]
cmp dword [ebp - 0xc], 0
je 0x406b16
mov eax, dword [ebp - 0xc]
push eax
call dword [0x4893f8]
cmp dword [ebp - 0x10], 0
je 0x406b26
mov ecx, dword [ebp - 0x10]
push ecx
call dword [0x4893f8]
mov edx, dword [ebp - 4]
push edx
call dword [0x4893f8]
xor eax, eax
mov esp, ebp
pop ebp
ret