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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
push esi
call fcn.0040a3f0
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x10], 0
push 0xfffffffffffffff6
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov dword [ebp - 8], eax
push 0
mov eax, dword [ebp - 8]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
push 1
push 0
push 0
mov ecx, dword [ebp - 8]
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
sub esi, eax
mov dword [ebp - 0x14], esi
cmp dword [ebp - 0x14], 0
jg 0x406746
jmp 0x406a6e
mov edx, dword [ebp - 0x14]
add edx, 1
push edx
call fcn.0040790f
add esp, 4
mov dword [ebp - 0x18], eax
push 0
lea eax, [ebp - 0x14]
push eax
mov ecx, dword [ebp - 0x14]
push ecx
mov edx, dword [ebp - 0x18]
push edx
mov eax, dword [ebp - 8]
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x406779
jmp 0x406a6e
cmp dword [ebp - 0x14], 0
jg 0x406790
mov ecx, dword [ebp - 0x18]
push ecx
call fcn.00407832
add esp, 4
jmp 0x406a6e
mov edx, dword [ebp - 0x18]
add edx, dword [ebp - 0x14]
mov byte [edx], 0
mov eax, dword [ebp - 0x18]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x406a62
push 0xa
mov ecx, dword [ebp - 4]
push ecx
call fcn.0040ae80
add esp, 8
mov dword [ebp - 0xc], eax
push 0x3d
mov edx, dword [ebp - 4]
push edx
call fcn.0040ae80
add esp, 8
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0xc], 0
je 0x4067d7
mov eax, dword [ebp - 0xc]
mov byte [eax], 0
cmp dword [ebp - 0x10], 0
je 0x406a45
mov ecx, dword [ebp - 0x10]
add ecx, 1
mov dword [ebp - 0x20], ecx
mov edx, dword [ebp - 0x10]
mov byte [edx], 0
push str.maximum
mov eax, dword [ebp - 4]
push eax
call fcn.0040bb40
add esp, 8
test eax, eax
jne 0x40683e
mov ecx, dword [ebp - 0x20]
push ecx
call fcn.0040bb37
add esp, 4
mov dword [0x423068], eax
cmp dword [0x42428c], 0
je 0x406839
mov edx, dword [0x423068]
push edx
push 0
push 0x406
mov eax, dword [0x42428c]
push eax
call dword [sym.imp.USER32.dll_SendMessageA]
jmp 0x406a45
push str.value
mov ecx, dword [ebp - 4]
push ecx
call fcn.0040bb40
add esp, 8
test eax, eax
jne 0x40688c
mov edx, dword [ebp - 0x20]
push edx
call fcn.0040bb37
add esp, 4
mov dword [0x4242b4], eax
cmp dword [0x42428c], 0
je 0x406887
push 0
mov eax, dword [0x4242b4]
push eax
push 0x402
mov ecx, dword [0x42428c]
push ecx
call dword [sym.imp.USER32.dll_SendMessageA]
jmp 0x406a45
push str.progressRect
mov edx, dword [ebp - 4]
push edx
call fcn.0040bb40
add esp, 8
test eax, eax
jne 0x406900
push 0x424294
mov eax, dword [ebp - 0x20]
push eax
call fcn.00406a80
add esp, 8
cmp dword [0x42428c], 0
je 0x4068fb
mov dword [ebp - 0x24], 0x34
mov ecx, dword [ebp - 0x24]
push ecx
mov edx, dword [0x4242a0]
sub edx, dword [0x424298]
push edx
mov eax, dword [0x42429c]
sub eax, dword [0x424294]
push eax
mov ecx, dword [0x424298]
push ecx
mov edx, dword [0x424294]
push edx
push 0
mov eax, dword [0x42428c]
push eax
call dword [sym.imp.USER32.dll_SetWindowPos]
jmp 0x406a45
push str.messageRect
mov ecx, dword [ebp - 4]
push ecx
call fcn.0040bb40
add esp, 8
test eax, eax
jne 0x406975
push 0x4242a4
mov edx, dword [ebp - 0x20]
push edx
call fcn.00406a80
add esp, 8
cmp dword [0x424288], 0
je 0x406970
mov dword [ebp - 0x28], 0x34
mov eax, dword [ebp - 0x28]
push eax
mov ecx, dword [0x4242b0]
sub ecx, dword [0x4242a8]
push ecx
mov edx, dword [0x4242ac]
sub edx, dword [0x4242a4]
push edx
mov eax, dword [0x4242a8]
push eax
mov ecx, dword [0x4242a4]
push ecx
push 0
mov edx, dword [0x424288]
push edx
call dword [sym.imp.USER32.dll_SetWindowPos]
jmp 0x406a45
push str.foreground
mov eax, dword [ebp - 4]
push eax
call fcn.0040bb40
add esp, 8
test eax, eax
jne 0x4069de
push 0x424290
mov ecx, dword [ebp - 0x20]
push ecx
call fcn.00406b80
add esp, 8
cmp dword [0x424288], 0
je 0x4069dc
lea edx, [ebp - 0x38]
push edx
mov eax, dword [0x424288]
push eax
call dword [sym.imp.USER32.dll_GetWindowRect]
push 2
lea ecx, [ebp - 0x38]
push ecx
mov edx, dword [0x424274]
push edx
push 0
call dword [sym.imp.USER32.dll_MapWindowPoints]
push 1
lea eax, [ebp - 0x38]
push eax
mov ecx, dword [0x424274]
push ecx
call dword [sym.imp.USER32.dll_InvalidateRect]
jmp 0x406a45
push str.message
mov edx, dword [ebp - 4]
push edx
call fcn.0040bb40
add esp, 8
test eax, eax
jne 0x406a45
cmp dword [0x424288], 0
je 0x406a45
mov eax, dword [ebp - 0x20]
push eax
mov ecx, dword [0x424288]
push ecx
call dword [sym.imp.USER32.dll_SetWindowTextA]
lea edx, [ebp - 0x48]
push edx
mov eax, dword [0x424288]
push eax
call dword [sym.imp.USER32.dll_GetWindowRect]
push 2
lea ecx, [ebp - 0x48]
push ecx
mov edx, dword [0x424274]
push edx
push 0
call dword [sym.imp.USER32.dll_MapWindowPoints]
push 1
lea eax, [ebp - 0x48]
push eax
mov ecx, dword [0x424274]
push ecx
call dword [sym.imp.USER32.dll_InvalidateRect]
cmp dword [ebp - 0xc], 0
je 0x406a56
mov edx, dword [ebp - 0xc]
add edx, 1
mov dword [ebp - 4], edx
jmp 0x406a5d
mov dword [ebp - 4], 0
jmp 0x40679f
mov eax, dword [ebp - 0x18]
push eax
call fcn.00407832
add esp, 4
pop esi
mov esp, ebp
pop ebp
ret