Function at 0x40c430
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x428c04
mov eax, dword fs:[0]
push eax
push ecx
sub esp, 0x78
push ebx
push esi
push edi
mov eax, dword [0x4314b0]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x7c], ecx
cmp dword [ebp + 8], 0
je 0x40c46f
mov eax, dword [ebp + 8]
movzx ecx, word [eax]
test ecx, ecx
jne 0x40c47e
push 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x40c7ed
mov dword [ebp - 0x38], 0
xor edx, edx
mov dword [ebp - 0x34], edx
mov dword [ebp - 0x30], edx
mov dword [ebp - 0x2c], edx
mov dword [ebp - 0x28], edx
mov dword [ebp - 0x24], edx
mov dword [ebp - 0x20], edx
mov dword [ebp - 0x1c], edx
mov dword [ebp - 0x18], edx
lea eax, [ebp - 0x38]
push eax
push 0
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesExW]
test eax, eax
jne 0x40c4c2
push 2
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x40c7ed
cmp dword [ebp - 0x18], 0
jne 0x40c4d7
push 0xd
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x40c7ed
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x3c], eax
cmp dword [ebp - 0x3c], 0xffffffff
jne 0x40c503
xor eax, eax
jmp 0x40c7ed
mov dword [ebp - 0x40], 0
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x48], eax
mov ecx, dword [ebp - 0x48]
shr ecx, 1
mov dword [ebp - 0x48], ecx
mov edx, dword [ebp - 0x48]
shl edx, 1
mov dword [ebp - 0x48], edx
mov eax, dword [ebp - 0x48]
add eax, 2
mov dword [ebp - 0x48], eax
mov dword [ebp - 4], 0
mov ecx, dword [ebp - 0x48]
push ecx
call fcn.00418e2c
add esp, 4
mov dword [ebp - 0x80], eax
mov edx, dword [ebp - 0x80]
mov dword [ebp - 0x5c], edx
mov eax, dword [ebp - 0x5c]
mov dword [ebp - 0x40], eax
jmp 0x40c55a
mov dword [ebp - 4], 0xffffffff
cmp dword [ebp - 0x40], 0
jne 0x40c587
mov ecx, dword [ebp - 0x3c]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x3c], 0xffffffff
push 0xe
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x40c7ed
push 2
push 0
mov edx, dword [ebp - 0x48]
mov eax, dword [ebp - 0x40]
lea ecx, [eax + edx - 2]
push ecx
call fcn.004185a0
add esp, 0xc
mov dword [ebp - 0x44], 0
push 0
lea edx, [ebp - 0x44]
push edx
mov eax, dword [ebp - 0x18]
push eax
mov ecx, dword [ebp - 0x40]
push ecx
mov edx, dword [ebp - 0x3c]
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40c5e4
mov eax, dword [ebp - 0x3c]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0x40]
mov dword [ebp - 0x60], ecx
mov edx, dword [ebp - 0x60]
push edx
call fcn.00418e21
add esp, 4
xor eax, eax
jmp 0x40c7ed
mov eax, dword [ebp - 0x3c]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0x40]
mov dx, word [ecx]
mov word [ebp - 0x14], dx
movzx eax, word [ebp - 0x14]
cmp eax, 0xbbef
jne 0x40c701
mov ecx, dword [ebp - 0x40]
movzx edx, byte [ecx + 2]
cmp edx, 0xbf
jne 0x40c701
mov dword [ebp - 0x50], 0
push 0
push 0
push 0xffffffffffffffff
mov eax, dword [ebp - 0x40]
push eax
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov dword [ebp - 0x4c], eax
mov dword [ebp - 4], 2
mov eax, dword [ebp - 0x4c]
add eax, 1
xor ecx, ecx
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00418e2c
add esp, 4
mov dword [ebp - 0x84], eax
mov eax, dword [ebp - 0x84]
mov dword [ebp - 0x64], eax
mov ecx, dword [ebp - 0x64]
mov dword [ebp - 0x50], ecx
jmp 0x40c685
mov dword [ebp - 4], 0xffffffff
cmp dword [ebp - 0x50], 0
jne 0x40c6ba
mov edx, dword [ebp - 0x40]
mov dword [ebp - 0x68], edx
mov eax, dword [ebp - 0x68]
push eax
call fcn.00418e21
add esp, 4
mov dword [ebp - 0x40], 0
push 0xe
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x40c7ed
xor ecx, ecx
mov edx, dword [ebp - 0x4c]
mov eax, dword [ebp - 0x50]
mov word [eax + edx*2], cx
mov ecx, dword [ebp - 0x4c]
add ecx, 1
push ecx
mov edx, dword [ebp - 0x50]
push edx
push 0xffffffffffffffff
mov eax, dword [ebp - 0x40]
push eax
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov ecx, dword [ebp - 0x40]
mov dword [ebp - 0x6c], ecx
mov edx, dword [ebp - 0x6c]
push edx
call fcn.00418e21
add esp, 4
mov eax, dword [ebp - 0x50]
mov dword [ebp - 0x40], eax
jmp 0x40c7ea
movzx ecx, word [ebp - 0x14]
cmp ecx, 0xfeff
je 0x40c7ea
mov dword [ebp - 0x58], 0
push 0
push 0
push 0xffffffffffffffff
mov edx, dword [ebp - 0x40]
push edx
push 0
push 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov dword [ebp - 0x54], eax
mov dword [ebp - 4], 4
mov eax, dword [ebp - 0x54]
add eax, 1
xor ecx, ecx
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00418e2c
add esp, 4
mov dword [ebp - 0x88], eax
mov eax, dword [ebp - 0x88]
mov dword [ebp - 0x70], eax
mov ecx, dword [ebp - 0x70]
mov dword [ebp - 0x58], ecx
jmp 0x40c779
mov dword [ebp - 4], 0xffffffff
cmp dword [ebp - 0x58], 0
jne 0x40c7ab
mov edx, dword [ebp - 0x40]
mov dword [ebp - 0x74], edx
mov eax, dword [ebp - 0x74]
push eax
call fcn.00418e21
add esp, 4
mov dword [ebp - 0x40], 0
push 0xe
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x40c7ed
xor ecx, ecx
mov edx, dword [ebp - 0x54]
mov eax, dword [ebp - 0x58]
mov word [eax + edx*2], cx
mov ecx, dword [ebp - 0x54]
add ecx, 1
push ecx
mov edx, dword [ebp - 0x58]
push edx
push 0xffffffffffffffff
mov eax, dword [ebp - 0x40]
push eax
push 0
push 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov ecx, dword [ebp - 0x40]
mov dword [ebp - 0x78], ecx
mov edx, dword [ebp - 0x78]
push edx
call fcn.00418e21
add esp, 4
mov eax, dword [ebp - 0x58]
mov dword [ebp - 0x40], eax
mov eax, dword [ebp - 0x40]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4