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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
push edi
xor edi, edi
push edi
push edi
push 0x1009
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_SendMessageW]
push dword [ebp + 0xc]
xor eax, eax
call fcn.00402806
pop ecx
mov dword [ebp - 0x14], eax
cmp eax, 0xffffffff
je 0x411291
push ebx
push edi
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
cmp ebx, edi
je 0x411287
lea eax, [ebx + 3]
push esi
push eax
call fcn.0040182c
pop ecx
mov esi, eax
push edi
lea eax, [ebp - 4]
push eax
push ebx
push esi
push dword [ebp - 0x14]
mov dword [ebp - 0x18], esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [ebp - 4], ebx
jne 0x41127d
mov eax, 0xfeff
cmp word [esi], ax
push 1
lea eax, [ebp - 0x24]
mov dword [ebp - 0x1c], edi
push eax
jne 0x41119f
add esi, 2
push esi
mov dword [ebp - 0x24], 0x5319f8
mov dword [ebp - 0x20], 0x532b74
call fcn.00401b0a
mov esi, eax
add esp, 0xc
mov dword [ebp - 0xc], esi
cmp esi, edi
je 0x41127d
mov dword [ebp - 8], edi
cmp dword [esi], edi
je 0x411171
jmp 0x4110f7
xor edi, edi
push edi
push dword [eax]
mov eax, 0x5319c0
call fcn.00401ab2
pop ecx
xor ebx, ebx
pop ecx
mov edi, eax
mov dword [ebp - 0x10], ebx
test ebx, ebx
jne 0x411189
mov eax, dword [ebp - 8]
mov esi, dword [ebp + 8]
lea ecx, [eax + 1]
push ecx
push eax
or ebx, 0xffffffff
call fcn.004036a5
mov eax, dword [edi]
pop ecx
pop ecx
test eax, eax
je 0x411143
cmp word [eax], 0x31
jne 0x411143
push 0x2000
push dword [ebp - 8]
push esi
call fcn.00403968
add esp, 0xc
mov esi, dword [ebp - 0xc]
mov ebx, dword [ebp - 0x10]
inc ebx
mov dword [ebp - 0x10], ebx
cmp ebx, 0x13
jl 0x41110d
call fcn.004018dd
jmp 0x411163
inc dword [ebp - 8]
mov eax, dword [ebp - 8]
lea eax, [esi + eax*4]
cmp dword [eax], 0
jne 0x4110f5
mov edi, esi
call fcn.004018dd
jmp 0x411184
jmp 0x41127d
mov eax, dword [edi + ebx*4]
test eax, eax
je 0x411146
push dword [ebp - 8]
push dword [ebp + 8]
call fcn.004035bb
pop ecx
pop ecx
jmp 0x411146
push esi
mov dword [ebp - 0x24], 0x532b78
mov dword [ebp - 0x20], 0x5307b0
call fcn.00401c2e
mov esi, eax
add esp, 0xc
mov dword [ebp - 0x10], esi
cmp esi, edi
je 0x41127d
mov dword [ebp - 8], edi
cmp dword [esi], edi
je 0x41126a
jmp 0x4111d2
xor edi, edi
mov eax, dword [eax]
jmp 0x4111e0
push edi
lea ecx, [ebp - 0x20]
push ecx
push eax
mov dword [ebp - 0x20], 0x531a20
mov dword [ebp - 0x1c], edi
call fcn.00401c2e
add esp, 0xc
xor ebx, ebx
mov edi, eax
mov dword [ebp - 0xc], ebx
test ebx, ebx
jne 0x411296
mov eax, dword [ebp - 8]
mov esi, dword [ebp + 8]
lea ecx, [eax + 1]
push ecx
push eax
or ebx, 0xffffffff
call fcn.004036a5
mov eax, dword [edi]
pop ecx
pop ecx
test eax, eax
je 0x411238
cmp byte [eax], 0x31
jne 0x411238
push 0x2000
push dword [ebp - 8]
push esi
call fcn.00403968
add esp, 0xc
mov esi, dword [ebp - 0x10]
mov ebx, dword [ebp - 0xc]
inc ebx
mov dword [ebp - 0xc], ebx
cmp ebx, 0x13
jl 0x4111ff
call fcn.004018dd
jmp 0x411258
inc dword [ebp - 8]
mov eax, dword [ebp - 8]
lea eax, [esi + eax*4]
cmp dword [eax], 0
jne 0x4111d0
mov edi, esi
call fcn.004018dd
jmp 0x41127d
push dword [ebp - 0x18]
call fcn.0040199d
pop ecx
pop esi
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop ebx
xor eax, eax
pop edi
leave
ret
mov eax, dword [edi + ebx*4]
test eax, eax
je 0x41123b
push dword [ebp - 8]
push dword [ebp + 8]
call fcn.00403630
pop ecx
pop ecx
jmp 0x41123b