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

Disassembly:
push 0xffffffffffffffff
push 0x44a3e7
mov eax, dword fs:[0]
push eax
sub esp, 0x11c
push ebx
push ebp
push esi
push edi
mov eax, dword [0x463fcc]
xor eax, esp
push eax
lea eax, [esp + 0x130]
mov dword fs:[0], eax
mov dword [esp + 0x24], ecx
xor ebp, ebp
xor ebx, ebx
mov dword [esp + 0x1c], ebp
mov eax, dword [esp + 0x140]
mov eax, dword [eax]
push ebx
push 0x80
push 3
push ebx
push 1
push SysReAllocString
push eax
mov dword [esp + 0x154], ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
jne 0x40c06c
call fcn.004020e0
jmp 0x40c074
mov ebp, eax
mov dword [esp + 0x1c], ebp
xor eax, eax
push eax
call fcn.00422a20
mov edx, dword [0x465aac]
mov eax, dword [edx + 0xc]
add esp, 4
mov ecx, 0x465aac
call eax
lea edi, [eax + 0x10]
mov dword [esp + 0x28], edi
lea ecx, [esp + 0x18]
push ecx
push ebp
mov byte [esp + 0x140], 1
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0xffffffff
mov dword [esp + 0x14], eax
jne 0x40c0c4
call fcn.004020e0
cmp eax, ebx
jge 0x40c0c0
mov esi, dword [esp + 0x14]
jmp 0x40c0d0
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
mov esi, eax
mov dword [esp + 0x18], edx
xor eax, eax
push eax
call fcn.00422a20
mov eax, dword [esp + 0x148]
add esp, 4
cmp esi, eax
jb 0x40c0e6
mov esi, eax
mov eax, dword [edi - 8]
mov ecx, 1
sub ecx, dword [edi - 4]
lea edx, [esi + 1]
sub eax, edx
or eax, ecx
jge 0x40c108
push edx
lea ecx, [esp + 0x2c]
call fcn.00408f10
mov edi, dword [esp + 0x28]
push ebx
lea eax, [esp + 0x18]
push eax
push esi
push edi
push ebp
mov dword [esp + 0x28], ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp eax, ebx
jne 0x40c126
call fcn.004020e0
jmp 0x40c135
mov eax, dword [esp + 0x14]
sub eax, esi
neg eax
sbb eax, eax
and eax, 0x80070026
push eax
call fcn.00422a20
add esp, 4
cmp ebp, ebx
mov byte [esi + edi], 0
je 0x40c153
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor ebp, ebp
mov dword [esp + 0x1c], ebp
mov edx, dword [0x465aac]
mov eax, dword [edx + 0xc]
mov ecx, 0x465aac
call eax
lea ebx, [eax + 0x10]
mov dword [esp + 0x14], ebx
cmp esi, 2
mov byte [esp + 0x138], 2
jb 0x40c1a0
mov al, byte [edi]
cmp al, 0xff
jne 0x40c18d
cmp byte [edi + 1], 0xfe
jne 0x40c18d
mov eax, 1
lea edx, [eax + 1]
jmp switch.0x0040c1c3
cmp al, 0xfe
jne 0x40c1a0
cmp byte [edi + 1], 0xff
jne 0x40c1a0
mov eax, 2
mov edx, eax
jmp switch.0x0040c1c3
cmp esi, 3
jb 0x40c1bf
cmp byte [edi], 0xef
jne 0x40c1bf
cmp byte [edi + 1], 0xbb
jne 0x40c1bf
cmp byte [edi + 2], 0xbf
jne 0x40c1bf
mov eax, 3
mov edx, eax
jmp switch.0x0040c1c3
xor eax, eax
xor edx, edx
jmp dword [eax*4 + 0x40c3b0]
lea ecx, [esi - 1]
cmp edx, ecx
jae case.0x40c1c3.1
sub ecx, edx
sub ecx, 1
shr ecx, 1
add ecx, 1
lea eax, [edx + edi + 1]
mov esi, ecx
mov cl, byte [eax - 1]
mov bl, byte [eax]
mov byte [eax - 1], bl
mov byte [eax], cl
add eax, 2
sub esi, 1
jne 0x40c1e1
add edx, edi
jne 0x40c209
xor eax, eax
push eax
push edx
lea ecx, [esp + 0x1c]
call fcn.00401500
jmp 0x40c28a
mov eax, edx
lea esi, [eax + 2]
mov edi, edi
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40c210
sub eax, esi
sar eax, 1
push eax
push edx
lea ecx, [esp + 0x1c]
call fcn.00401500
jmp 0x40c28a
test eax, eax
je 0x40c23e
cmp eax, 3
mov eax, 0xfde9
je 0x40c23e
mov eax, dword [esp + 0x24]
sub esi, edx
je 0x40c28e
lea ecx, [esp + 0x30]
push eax
add edx, edi
mov dword [esp + 0x30], ecx
push edx
lea ecx, [esp + 0x34]
call fcn.00408570
mov edx, dword [esp + 0x2c]
push edx
lea ecx, [esp + 0x18]
mov byte [esp + 0x13c], 3
call fcn.004015a0
mov eax, dword [esp + 0x2c]
lea ecx, [esp + 0x30]
cmp eax, ecx
mov byte [esp + 0x138], 2
je 0x40c28a
push eax
call fcn.0042efe6
add esp, 4
mov ebx, dword [esp + 0x14]
test ebx, ebx
lea edx, [esp + 0x30]
mov dword [esp + 0x2c], edx
jne 0x40c2a0
mov dword [esp + 0x2c], ebx
jmp 0x40c2d9
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov esi, eax
push 0x80
lea eax, [esp + 0x34]
push eax
add esi, 1
lea ecx, [esp + 0x34]
push esi
push ecx
call fcn.00408060
mov edx, dword [esp + 0x3c]
add esi, esi
push esi
push ebx
push esi
push edx
call fcn.0042e66f
push eax
call fcn.00401850
add esp, 0x24
mov eax, dword [esp + 0x2c]
push eax
lea ecx, [esp + 0x24]
mov byte [esp + 0x13c], 4
call fcn.00404ce0
mov eax, dword [esp + 0x2c]
lea ecx, [esp + 0x30]
cmp eax, ecx
mov byte [esp + 0x138], 2
je 0x40c30c
push eax
call fcn.0042efe6
add esp, 4
mov edx, dword [esp + 0x24]
mov eax, dword [edx]
mov ecx, dword [esp + 0x20]
mov edx, dword [eax]
push ecx
push edx
call dword [sym.imp.USER32.dll_SetWindowTextW]
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40c340
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [ebx - 0x10]
mov byte [esp + 0x138], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40c364
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [edi - 0x10]
mov byte [esp + 0x138], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40c388
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test ebp, ebp
je 0x40c393
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0x130]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x128
ret 8