Function at 0x401ba8
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x54
mov eax, dword [0x404224]
mov ecx, dword [0x404228]
or dword [ebp - 0x18], 0xffffffff
or dword [ebp - 0x14], 0xffffffff
push ebx
push esi
mov esi, dword [eax + 8]
xor edx, edx
cmp esi, dword [ecx + 8]
push edi
mov dword [ebp - 0xc], edx
jne 0x401df5
mov esi, dword [eax + 4]
cmp esi, dword [ecx + 4]
jne 0x401df5
mov esi, dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, 0x80
push edx
push ebx
push 3
push edx
mov edi, 0x80000000
push 1
add eax, 0xc
push edi
push eax
call esi
push 0
mov dword [ebp - 0x18], eax
mov eax, dword [0x404228]
push ebx
push 3
push 0
push 1
add eax, 0xc
push edi
push eax
call esi
cmp dword [ebp - 0x18], 0xffffffff
mov dword [ebp - 0x14], eax
je 0x401dfc
cmp eax, 0xffffffff
je 0x401dfc
mov eax, dword [0x404230]
push 1
mov dword [ebp - 0x28], eax
pop edx
lea ebx, [eax + 0x1000]
mov eax, dword [0x404224]
mov dword [0x404234], 9
mov dword [0x404248], 4
mov dword [0x40425c], edx
mov ecx, dword [eax + 8]
mov esi, dword [eax + 4]
mov eax, ecx
shl esi, 0x14
shr eax, 0xc
add esi, eax
mov dword [ebp - 0x10], ebx
test cx, 0xfff
mov dword [ebp - 8], ebx
je 0x401c7b
inc esi
cmp esi, edx
mov dword [ebp - 8], edx
jb 0x401dca
mov edi, 0x1000
lea eax, [ebp - 0x20]
push 0
push eax
push edi
push dword [ebp - 0x28]
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_ReadFile]
lea eax, [ebp - 0x1c]
push 0
push eax
push edi
push ebx
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [ebp - 0x20]
cmp eax, dword [ebp - 0x1c]
jne 0x401dfc
cmp eax, edi
jne 0x401ce6
mov eax, dword [ebp - 0x28]
and dword [ebp - 4], 0
mov ecx, ebx
sub ecx, eax
mov edx, dword [eax]
cmp edx, dword [ecx + eax]
jne 0x401df5
inc dword [ebp - 4]
add eax, 4
cmp dword [ebp - 4], 0x400
jl 0x401cca
jmp 0x401d13
cmp dword [ebp - 8], esi
jb 0x401dfc
and dword [ebp - 4], 0
test eax, eax
jle 0x401d13
mov ecx, dword [ebp - 0x28]
sub ebx, ecx
mov dl, byte [ecx]
cmp dl, byte [ecx + ebx]
jne 0x401df5
inc dword [ebp - 4]
inc ecx
cmp dword [ebp - 4], eax
jl 0x401cfc
mov ebx, dword [ebp - 0x10]
cmp esi, 0x100000
jae 0x401d2a
mov eax, dword [0x404238]
xor edx, edx
imul eax, dword [ebp - 8]
div esi
jmp 0x401d40
mov eax, dword [ebp - 8]
mov ecx, esi
shr eax, 5
imul eax, dword [0x404238]
shr ecx, 5
xor edx, edx
div ecx
add eax, 4
cmp eax, dword [0x404248]
mov dword [ebp - 0x1c], eax
jle 0x401d6b
push 0x141
push 0
push 0x404240
mov dword [0x404248], eax
push dword [0x404258]
call dword [sym.imp.USER32.dll_RedrawWindow]
and dword [ebp - 4], 0
xor eax, eax
push 1
push eax
push eax
push eax
lea eax, [ebp - 0x54]
push eax
call dword [sym.imp.USER32.dll_PeekMessageA]
test eax, eax
je 0x401dbe
mov eax, dword [ebp - 0x50]
cmp eax, 0x10
jb 0x401d91
cmp eax, 0x12
jbe 0x401dd3
cmp eax, 0x100
jne 0x401da4
cmp dword [ebp - 0x4c], 0x1b
je 0x401dec
cmp dword [ebp - 0x4c], 0x58
je 0x401dec
cmp eax, 0x111
je 0x401db5
lea eax, [ebp - 0x54]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageA]
inc dword [ebp - 4]
cmp dword [ebp - 4], 5
jl 0x401d6f
inc dword [ebp - 8]
cmp dword [ebp - 8], esi
jbe 0x401c8b
mov dword [ebp - 0xc], 2
jmp 0x401dfc
push dword [ebp - 0x48]
push dword [ebp - 0x4c]
push eax
push dword [ebp - 0x54]
call dword [sym.imp.USER32.dll_PostMessageA]
or dword [0x40425c], 0xffffffff
jmp 0x401dfc
mov dword [ebp - 0xc], 3
jmp 0x401dfc
mov dword [ebp - 0xc], 1
push dword [ebp - 0x18]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebp - 0x14]
call esi
cmp dword [0x40425c], 0
jl 0x401eb6
mov ebx, dword [ebp - 0xc]
mov esi, dword [sym.imp.USER32.dll_SendMessageA]
lea eax, [ebx + ebx*4]
lea edi, [eax*4 + 0x4040b0]
push edi
push 0
push 0x180
push dword [0x404254]
call esi
push 0
push eax
push 0x186
mov dword [0x40425c], eax
push dword [0x404254]
call esi
lea eax, [ebp - 0x38]
push eax
push dword [0x40425c]
push 0x198
push dword [0x404254]
call esi
cmp ebx, 3
je 0x401e74
or dword [0x40425c], 0xffffffff
mov eax, dword [ebp - 0x34]
add eax, 6
push eax
mov eax, dword [ebp - 0x30]
push 4
cdq
pop ecx
idiv ecx
push eax
push 0x8002
push dword [0x404258]
call dword [sym.imp.USER32.dll_PostMessageA]
add ebx, 2
shl ebx, 4
or ebx, 0x50000
inc edi
push ebx
push 0x404050
push edi
push dword [0x404258]
call dword [sym.imp.USER32.dll_MessageBoxA]
pop edi
pop esi
pop ebx
leave
ret