Function at 0x409244
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 closesocket
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x409280
call dword [sym.imp.KERNEL32.dll_GetLastError]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x4094f8
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
push ebx
mov dword [ebp - 0xc], ebx
call fcn.00401085
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, 0x10
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.00405ffa
mov esi, eax
mov ebx, 0x104
mov ecx, ebx
mov dword [ebp - 0x18], esi
call fcn.00405ffa
mov ecx, ebx
mov dword [ebp + 8], eax
call fcn.00405ffa
xor ecx, ecx
mov dword [ebp - 8], eax
xor dh, dh
xor ebx, ebx
cmp dword [ebp - 0xc], ecx
jbe 0x4094da
mov dl, byte [ebx + edi]
lea eax, [edx - 0x21]
cmp al, 0x5d
ja 0x4093e9
cmp dl, 0x3d
je 0x4093e9
mov byte [ecx + esi], dl
inc ecx
test dh, dh
jne 0x4093b1
cmp ecx, 7
jle 0x4093e9
cmp byte [ecx + esi - 7], 0x41
jne 0x4093e9
cmp byte [ecx + esi - 6], 0x63
jne 0x4093e9
cmp byte [ecx + esi - 5], 0x63
jne 0x4093e9
cmp byte [ecx + esi - 4], 0x6f
jne 0x4093e9
cmp byte [ecx + esi - 3], 0x75
jne 0x4093e9
cmp byte [ecx + esi - 2], 0x6e
jne 0x4093e9
cmp byte [ecx + esi - 1], 0x74
jne 0x4093e9
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 0x4093a6
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 0x4093a0
inc edi
mov byte [edx + esi], al
inc edx
mov al, byte [edi]
cmp al, 0x20
ja 0x409391
mov esi, dword [ebp - 0x18]
mov edi, dword [ebp - 0x1c]
mov eax, dword [ebp + 8]
mov byte [edx + eax], 0
mov dh, 1
jmp 0x4093e9
cmp byte [ecx + esi - 8], 0x50
jne 0x4093e9
cmp byte [ecx + esi - 7], 0x61
jne 0x4093e9
cmp byte [ecx + esi - 6], 0x73
jne 0x4093e9
cmp byte [ecx + esi - 5], 0x73
jne 0x4093e9
cmp byte [ecx + esi - 4], 0x77
jne 0x4093e9
cmp byte [ecx + esi - 3], 0x6f
jne 0x4093e9
cmp byte [ecx + esi - 2], 0x72
jne 0x4093e9
cmp byte [ecx + esi - 1], 0x64
je 0x4093f8
inc ebx
cmp ebx, dword [ebp - 0xc]
jb 0x4092f5
jmp 0x4094da
cmp byte [edi], 0xd0
push 2
pop eax
push 9
pop ecx
cmovne eax, ecx
xor edx, edx
lea ecx, [eax + ebx]
mov al, byte [ecx + edi]
cmp al, 0x20
jbe 0x409428
mov ebx, dword [ebp - 8]
add ecx, edi
cmp al, 0x7f
jae 0x409428
cmp al, 0x21
je 0x409428
mov byte [edx + ebx], al
inc edx
inc ecx
mov al, byte [ecx]
cmp al, 0x20
ja 0x409415
mov eax, dword [ebp - 8]
xor ecx, ecx
mov dword [ebp - 0x30], ecx
mov dword [ebp - 0x2c], ecx
mov dword [ebp - 0x28], ecx
mov byte [edx + eax], cl
lea ecx, [ebp - 0x10]
push eax
call fcn.004034d1
push dword [ebp + 8]
lea ecx, [ebp - 0xc]
call fcn.004034d1
lea eax, [ebp - 0x1c]
push eax
lea ecx, [ebp - 0x10]
call fcn.004031af
push eax
lea ecx, [ebp - 0x28]
call fcn.00403549
mov ecx, dword [ebp - 0x1c]
call fcn.00405feb
lea eax, [ebp - 0x1c]
push eax
lea ecx, [ebp - 0xc]
call fcn.004031af
push eax
lea ecx, [ebp - 0x2c]
call fcn.00403549
mov ecx, dword [ebp - 0x1c]
call fcn.00405feb
push 0x417668
lea ecx, [ebp - 0x1c]
mov dword [ebp - 0x24], 5
call fcn.004036f7
push eax
lea ecx, [ebp - 0x30]
call fcn.00403549
mov ecx, dword [ebp - 0x1c]
call fcn.00405feb
sub esp, 0x10
lea eax, [ebp - 0x30]
mov ecx, esp
push eax
call fcn.00401ff2
mov ecx, dword [ebp - 0x20]
call fcn.00402028
mov ecx, dword [ebp - 0xc]
call fcn.00405feb
mov ecx, dword [ebp - 0x10]
call fcn.00405feb
lea ecx, [ebp - 0x30]
call fcn.00401441
mov ecx, dword [ebp + 8]
call fcn.00405feb
mov ecx, dword [ebp - 8]
call fcn.00405feb
mov ecx, esi
call fcn.00405feb
push edi
call fcn.00401099
pop ecx
pop edi
pop esi
pop ebx
leave
ret 4