Function at 0x40cb30
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x58
push ebx
push esi
push 0x3c
lea eax, [ebp - 0x58]
mov dword [ebp - 8], 0
mov ebx, edx
mov dword [ebp - 4], 0
push 0
push eax
mov dword [ebp - 0x14], ebx
mov esi, ecx
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x10], 0
call fcn.0042a4e0
add esp, 0xc
mov dword [0x457494], 1
xorps xmm0, xmm0
movq qword [ebx], xmm0
mov dword [ebx + 8], 0
push 0
push 0x2000080
push 3
push 0
push 7
push SysReAllocString
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
mov dword [ebp - 0xc], ebx
cmp ebx, 0xffffffff
jne 0x40cbc2
pop esi
mov dword [0x45748c], 1
xor al, al
mov dword [0x457490], 6
pop ebx
mov esp, ebp
pop ebp
ret
mov esi, dword [sym.imp.KERNEL32.dll_ReadFile]
lea eax, [ebp - 8]
push edi
push 0
push eax
push 0x28
lea eax, [ebp - 0x58]
push eax
push ebx
call esi
test eax, eax
je 0x40cee2
mov eax, dword [ebp - 8]
cmp eax, 0x24
jb 0x40cee2
cmp dword [ebp - 0x58], 0x4643534d
jne 0x40cee2
cmp word [ebp - 0x3c], 0
je 0x40cc71
cmp eax, 0x28
jb 0x40cc71
mov al, byte [ebp - 0x3a]
mov edi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
test al, 7
je 0x40cc67
test al, 4
je 0x40cc1f
movzx eax, word [ebp - 0x34]
add eax, 0x28
jmp 0x40cc24
mov eax, 0x24
push 0
push 0
push eax
push ebx
mov dword [ebp - 4], eax
call edi
cmp dword [ebp - 4], eax
jne 0x40cc4e
test byte [ebp - 0x3a], 3
jne 0x40cc4e
push 0
lea eax, [ebp - 8]
push eax
push 4
lea eax, [ebp - 4]
push eax
push ebx
call esi
mov eax, dword [ebp - 4]
jmp 0x40cc6d
mov dword [0x45748c], 9
mov dword [0x457490], 0x26
jmp 0x40cef6
mov eax, dword [ebp - 0x34]
mov dword [ebp - 4], eax
test eax, eax
jne 0x40cc80
mov dword [0x457494], 0
jmp 0x40cef6
mov ecx, dword [ebp - 0x48]
cmp eax, ecx
jb 0x40cecc
cmp eax, dword [ebp - 0x50]
ja 0x40cecc
push 0
push 0
push ecx
push ebx
call edi
mov ecx, dword [ebp - 0x48]
cmp eax, ecx
jne 0x40cecc
mov eax, dword [ebp - 4]
mov edi, dword [sym.imp.KERNEL32.dll_HeapAlloc]
sub eax, ecx
mov dword [ebp - 4], eax
add eax, 0x12
push eax
push 0
push dword [0x45764c]
call edi
mov dword [ebp - 0x10], eax
test eax, eax
jne 0x40cce3
mov dword [0x45748c], 5
mov dword [0x457490], 8
jmp 0x40cef6
push 0
lea ecx, [ebp - 8]
push ecx
push dword [ebp - 4]
push eax
push ebx
call esi
test eax, eax
je 0x40cecc
mov eax, dword [ebp - 8]
cmp eax, 0x11
jb 0x40cecc
mov ecx, dword [ebp - 0x10]
xorps xmm0, xmm0
mov esi, ecx
mov ebx, ecx
movups xmmword [ecx + eax], xmm0
mov word [ecx + eax + 0x10], 0
movzx eax, word [ebp - 0x3c]
sub esi, dword [ebp - 0x48]
add esi, 0x10
mov dword [ebp - 0x18], esi
lea eax, [eax + eax*2]
shl eax, 3
push eax
push 8
push dword [0x45764c]
call edi
mov edi, eax
mov eax, dword [ebp - 0x14]
mov dword [eax + 8], edi
test edi, edi
jne 0x40cd5f
mov ebx, dword [ebp - 0xc]
mov dword [0x45748c], 5
mov dword [0x457490], 8
jmp 0x40cef6
cmp word [ebp - 0x3c], 0
je 0x40ce8b
nop word [eax + eax]
push 0
push 0
mov eax, ebx
sub eax, esi
lea esi, [ebx + 0x10]
push 0xffffffffffffffff
push esi
push 0
add eax, 0x10
push 0xfde9
mov dword [edi + 8], eax
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
movzx eax, ax
mov word [edi + 2], ax
add eax, eax
push eax
push 0
push dword [0x45764c]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [edi + 4], eax
test eax, eax
je 0x40cd43
movzx ecx, word [edi + 2]
push ecx
push eax
push 0xffffffffffffffff
push esi
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
movzx eax, word [edi + 2]
mov ecx, dword [ebp - 0x14]
dec ax
mov word [edi], ax
mov eax, dword [ebx]
mov dword [edi + 0xc], eax
movzx eax, word [ebx + 0xa]
add word [edi + 0x10], ax
movzx eax, word [ebx + 0xc]
add word [edi + 0x12], ax
add edi, 0x18
mov eax, dword [ebx]
add dword [ecx], eax
inc word [ecx + 4]
test esi, esi
je 0x40ce41
mov ecx, 0x100
mov eax, esi
nop dword [eax]
cmp byte [eax], 0
je 0x40ce0b
inc eax
sub ecx, 1
jne 0x40ce00
test ecx, ecx
je 0x40ce20
mov eax, 0x100
sub eax, ecx
mov dword [0x457630], eax
movzx eax, ax
jmp 0x40ce2c
mov dword [0x457630], 0
xor eax, eax
movzx eax, ax
test ecx, ecx
je 0x40ce41
inc eax
movzx eax, ax
mov word [0x457630], ax
mov ecx, eax
jmp 0x40ce5d
mov dword [0x457630], 0
test esi, esi
je 0x40ce5b
cmp byte [esi], 0
je 0x40ce5b
mov ecx, 0x100
jmp 0x40ce5d
xor ecx, ecx
mov edx, dword [ebp - 0x3c]
movzx eax, cx
dec edx
add eax, 0x10
mov word [ebp - 0x3c], dx
add ebx, eax
lea eax, [ecx + 0x10]
movzx ecx, ax
mov eax, dword [ebp - 8]
cmp eax, ecx
jbe 0x40ceae
mov esi, dword [ebp - 0x18]
sub eax, ecx
mov dword [ebp - 8], eax
test dx, dx
jne 0x40cd70
mov ebx, dword [ebp - 0xc]
mov dword [0x45748c], 0
mov dword [0x457490], 0
mov dword [0x457494], 0
jmp 0x40cef6
test dx, dx
je 0x40ce8b
mov ebx, dword [ebp - 0xc]
mov dword [0x45748c], 4
mov dword [0x457490], 0x7a
jmp 0x40cef6
mov dword [0x45748c], 0xc
mov dword [0x457490], 0x26
jmp 0x40cef6
mov dword [0x45748c], 2
mov dword [0x457490], 0xd
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0x10]
push 0
push dword [0x45764c]
call dword [sym.imp.KERNEL32.dll_HeapFree]
cmp dword [0x457494], 1
pop edi
pop esi
setne al
pop ebx
mov esp, ebp
pop ebp
ret