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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x20], ecx
push ebx
push ebx
push 3
push ebx
push 7
push 0x80000000
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x408642
call dword [sym.imp.KERNEL32.dll_GetLastError]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x4088b4
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
mov ecx, ebx
mov dword [ebp - 0xc], ebx
call fcn.004059a9
push ebx
mov edi, eax
push 0
push edi
mov dword [ebp - 0x1c], edi
call fcn.00401052
and dword [ebp - 0x14], 0
lea eax, [ebp - 0x14]
add esp, 0xc
push 0
push eax
push ebx
push edi
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, 0x400000
call fcn.0040590a
mov esi, eax
mov ebx, 0x104
mov ecx, ebx
mov dword [ebp - 0x18], esi
call fcn.0040590a
mov ecx, ebx
mov dword [ebp + 8], eax
call fcn.0040590a
xor ecx, ecx
mov dword [ebp - 8], eax
xor dh, dh
xor ebx, ebx
cmp dword [ebp - 0xc], ecx
jbe 0x40889d
mov dl, byte [ebx + edi]
lea eax, [edx - 0x21]
cmp al, 0x5d
ja 0x4087ac
cmp dl, 0x3d
je 0x4087ac
mov byte [ecx + esi], dl
inc ecx
test dh, dh
jne 0x408774
cmp ecx, 7
jle 0x4087ac
cmp byte [ecx + esi - 7], 0x41
jne 0x4087ac
cmp byte [ecx + esi - 6], 0x63
jne 0x4087ac
cmp byte [ecx + esi - 5], 0x63
jne 0x4087ac
cmp byte [ecx + esi - 4], 0x6f
jne 0x4087ac
cmp byte [ecx + esi - 3], 0x75
jne 0x4087ac
cmp byte [ecx + esi - 2], 0x6e
jne 0x4087ac
cmp byte [ecx + esi - 1], 0x74
jne 0x4087ac
cmp byte [edi], 0xd0
push 2
pop eax
push 9
pop edx
cmovne eax, edx
xor edx, edx
add eax, ebx
mov dword [ebp - 0x10], eax
mov al, byte [eax + edi]
cmp al, 0x20
jbe 0x408769
mov esi, dword [ebp - 0x10]
add esi, edi
mov dword [ebp - 0x10], esi
mov edi, esi
mov esi, dword [ebp + 8]
cmp al, 0x7f
jae 0x408763
inc edi
mov byte [edx + esi], al
inc edx
mov al, byte [edi]
cmp al, 0x20
ja 0x408754
mov esi, dword [ebp - 0x18]
mov edi, dword [ebp - 0x1c]
mov eax, dword [ebp + 8]
mov byte [edx + eax], 0
mov dh, 1
jmp 0x4087ac
cmp byte [ecx + esi - 8], 0x50
jne 0x4087ac
cmp byte [ecx + esi - 7], 0x61
jne 0x4087ac
cmp byte [ecx + esi - 6], 0x73
jne 0x4087ac
cmp byte [ecx + esi - 5], 0x73
jne 0x4087ac
cmp byte [ecx + esi - 4], 0x77
jne 0x4087ac
cmp byte [ecx + esi - 3], 0x6f
jne 0x4087ac
cmp byte [ecx + esi - 2], 0x72
jne 0x4087ac
cmp byte [ecx + esi - 1], 0x64
je 0x4087bb
inc ebx
cmp ebx, dword [ebp - 0xc]
jb 0x4086b8
jmp 0x40889d
cmp byte [edi], 0xd0
push 2
pop eax
push 9
pop ecx
cmovne eax, ecx
lea ecx, [eax + ebx]
xor ebx, ebx
mov al, byte [ecx + edi]
mov edx, ebx
cmp al, 0x20
jbe 0x4087ed
add ecx, edi
mov edi, dword [ebp - 8]
cmp al, 0x7f
jae 0x4087ed
cmp al, 0x21
je 0x4087ed
mov byte [edx + edi], al
inc edx
inc ecx
mov al, byte [ecx]
cmp al, 0x20
ja 0x4087da
mov eax, dword [ebp - 8]
lea ecx, [ebp - 0x10]
push eax
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x2c], ebx
mov byte [edx + eax], bl
mov dword [ebp - 0x28], ebx
call fcn.00403185
push dword [ebp + 8]
lea ecx, [ebp - 0xc]
call fcn.00403185
lea eax, [ebp - 0x1c]
push eax
lea ecx, [ebp - 0x10]
call fcn.00402e63
push eax
lea ecx, [ebp - 0x28]
call fcn.004031fd
mov ecx, dword [ebp - 0x1c]
call fcn.004058fb
lea eax, [ebp - 0x1c]
push eax
lea ecx, [ebp - 0xc]
call fcn.00402e63
push eax
lea ecx, [ebp - 0x2c]
call fcn.004031fd
mov ecx, dword [ebp - 0x1c]
call fcn.004058fb
push 0x412428
lea ecx, [ebp - 0x1c]
mov dword [ebp - 0x24], 5
call fcn.004033ab
push eax
lea ecx, [ebp - 0x30]
call fcn.004031fd
mov ecx, dword [ebp - 0x1c]
call fcn.004058fb
sub esp, 0x10
lea eax, [ebp - 0x30]
mov ecx, esp
push eax
call fcn.00401ed8
mov ecx, dword [ebp - 0x20]
call fcn.00401f0e
mov ecx, dword [ebp - 0xc]
call fcn.004058fb
mov ecx, dword [ebp - 0x10]
call fcn.004058fb
lea ecx, [ebp - 0x30]
call fcn.0040138f
mov ecx, dword [ebp + 8]
call fcn.004058fb
mov ecx, dword [ebp - 8]
call fcn.004058fb
mov ecx, esi
call fcn.004058fb
pop edi
pop esi
pop ebx
leave
ret 4