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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x12c
push ebx
push esi
push edi
push str.proginfo.dat
lea eax, [ebp - 0x12c]
push 0x40a234
push eax
call fcn.004011ec
add esp, 0xc
xor esi, esi
lea eax, [ebp - 0x12c]
push esi
push 0x80
push 3
push esi
push 1
push 0x80000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
mov dword [ebp - 8], edi
jne 0x401694
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x24]
push 0x4092a4
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea eax, [ebp - 0x24]
push 0x40
push eax
push 0x409294
push dword [0x409e20]
call dword [sym.imp.USER32.dll_MessageBoxA]
jmp 0x4018fb
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x4018fb
lea eax, [ebx + 1]
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov esi, eax
lea eax, [ebp - 0x10]
push 0
push eax
push ebx
push esi
push edi
mov dword [ebp - 0xc], esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4018f8
xor edi, edi
cmp dword [ebp - 0x10], edi
je 0x4018f8
mov bl, 0xa
cmp byte [esi], bl
je 0x401701
mov dword [ebp - 4], 0x40a440
sub dword [ebp - 4], esi
mov eax, dword [ebp - 4]
push 1
add eax, esi
push esi
push eax
call fcn.004032b0
add esp, 0xc
inc esi
inc edi
cmp byte [esi], bl
jne 0x4016ea
and byte [edi + 0x40a43f], 0
xor edi, edi
inc esi
cmp byte [esi], bl
je 0x40172d
mov dword [ebp - 4], 0x409064
push 1
push esi
push dword [ebp - 4]
call fcn.004032b0
add esp, 0xc
inc esi
inc edi
inc dword [ebp - 4]
cmp byte [esi], bl
jne 0x401716
and byte [edi + 0x409063], 0
xor edi, edi
inc esi
cmp byte [esi], bl
je 0x401759
mov dword [ebp - 4], 0x40a548
push 1
push esi
push dword [ebp - 4]
call fcn.004032b0
add esp, 0xc
inc esi
inc edi
inc dword [ebp - 4]
cmp byte [esi], bl
jne 0x401742
and byte [edi + 0x40a547], 0
xor edi, edi
inc esi
cmp byte [esi], bl
je 0x401785
mov dword [ebp - 4], 0x40a860
push 1
push esi
push dword [ebp - 4]
call fcn.004032b0
add esp, 0xc
inc esi
inc edi
inc dword [ebp - 4]
cmp byte [esi], bl
jne 0x40176e
and byte [edi + 0x40a85f], 0
xor edi, edi
inc esi
cmp byte [esi], bl
je 0x4017b1
mov dword [ebp - 4], 0x40a02c
push 1
push esi
push dword [ebp - 4]
call fcn.004032b0
add esp, 0xc
inc esi
inc edi
inc dword [ebp - 4]
cmp byte [esi], bl
jne 0x40179a
and byte [edi + 0x40a02b], 0
xor edi, edi
inc esi
cmp byte [esi], bl
je 0x4017dd
mov dword [ebp - 4], 0x409f28
push 1
push esi
push dword [ebp - 4]
call fcn.004032b0
add esp, 0xc
inc esi
inc edi
inc dword [ebp - 4]
cmp byte [esi], bl
jne 0x4017c6
and byte [edi + 0x409f27], 0
xor edi, edi
inc esi
cmp byte [esi], bl
je 0x401809
mov dword [ebp - 4], 0x40a964
push 1
push esi
push dword [ebp - 4]
call fcn.004032b0
add esp, 0xc
inc esi
inc edi
inc dword [ebp - 4]
cmp byte [esi], bl
jne 0x4017f2
and byte [edi + 0x40a963], 0
xor edi, edi
inc esi
cmp byte [esi], bl
je 0x401835
mov dword [ebp - 4], 0x40aa68
push 1
push esi
push dword [ebp - 4]
call fcn.004032b0
add esp, 0xc
inc esi
inc edi
inc dword [ebp - 4]
cmp byte [esi], bl
jne 0x40181e
and byte [edi + 0x40aa67], 0
xor edi, edi
inc esi
cmp byte [esi], bl
je 0x401861
mov dword [ebp - 4], 0x40ab6c
push 1
push esi
push dword [ebp - 4]
call fcn.004032b0
add esp, 0xc
inc esi
inc edi
inc dword [ebp - 4]
cmp byte [esi], bl
jne 0x40184a
and byte [edi + 0x40ab6b], 0
push 0x3e9
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_GetDlgItem]
inc esi
push esi
push eax
call dword [sym.imp.USER32.dll_SetWindowTextA]
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov ebx, 0x104
mov esi, 0x40a650
push ebx
push 0x40a33c
push esi
call fcn.004032b0
push str.Program_Files_
push esi
call fcn.004030c0
mov edi, 0x40a02c
push edi
call fcn.004031a0
add esp, 0x18
test eax, eax
je 0x4018d9
push edi
push esi
call fcn.004030c0
push 0x4091bc
push esi
call fcn.004030c0
add esp, 0x10
push 0x40a440
push esi
call fcn.004030c0
push ebx
push esi
push 0x40a758
call fcn.004032b0
add esp, 0x14
push 1
pop eax
jmp 0x4018fd
and byte [esi], 0
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret