Function at 0x40a020
Capabilities:
Get file size
Hide graphical window
Read file on windows

Disassembly:
push 0xffffffffffffffff
push 0x44a080
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
push ebx
push ebp
push esi
push edi
mov eax, dword [0x463fcc]
xor eax, esp
push eax
lea eax, [esp + 0x30]
mov dword fs:[0], eax
mov ebp, ecx
mov dword [esp + 0x20], ebp
xor edi, edi
mov dword [esp + 0x14], edi
mov eax, dword [esp + 0x40]
mov eax, dword [eax]
push edi
push 0x80
push 3
push edi
push 1
push SysReAllocString
push eax
mov dword [esp + 0x54], edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
jne 0x40a080
call fcn.004020e0
jmp 0x40a08a
mov dword [esp + 0x14], eax
mov edi, dword [esp + 0x14]
xor eax, eax
push eax
call fcn.00422a20
mov edx, dword [0x465aac]
mov eax, dword [edx + 0xc]
add esp, 4
mov ecx, 0x465aac
call eax
lea ebx, [eax + 0x10]
mov dword [esp + 0x18], ebx
lea ecx, [esp + 0x2c]
push ecx
push edi
mov byte [esp + 0x40], 1
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0xffffffff
mov dword [esp + 0x28], eax
jne 0x40a0d7
call fcn.004020e0
test eax, eax
jge 0x40a0d3
mov esi, dword [esp + 0x28]
jmp 0x40a0e3
mov eax, dword [esp + 0x28]
mov edx, dword [esp + 0x2c]
mov esi, eax
mov dword [esp + 0x2c], edx
xor eax, eax
push eax
call fcn.00422a20
mov eax, dword [esp + 0x48]
add esp, 4
cmp esi, eax
mov dword [esp + 0x44], esi
jb 0x40a0fc
mov dword [esp + 0x44], eax
mov eax, dword [ebx - 8]
mov esi, dword [esp + 0x44]
mov ecx, 1
sub ecx, dword [ebx - 4]
sub eax, esi
or eax, ecx
jge 0x40a11b
push esi
lea ecx, [esp + 0x1c]
call fcn.00408f10
mov ecx, dword [esp + 0x18]
xor ebx, ebx
push ebx
lea eax, [esp + 0x44]
push eax
push esi
push ecx
push edi
mov dword [esp + 0x54], ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp eax, ebx
jne 0x40a13f
call fcn.004020e0
jmp 0x40a14e
mov eax, dword [esp + 0x40]
sub eax, esi
neg eax
sbb eax, eax
and eax, 0x80070026
push eax
call fcn.00422a20
add esp, 4
cmp edi, ebx
je 0x40a168
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esp + 0x14], ebx
mov edi, ebx
mov eax, dword [ebp]
mov edx, dword [eax]
push 0x44e890
push edx
call dword [sym.imp.USER32.dll_SetWindowTextW]
mov eax, dword [ebp]
mov eax, dword [eax]
push ebx
push eax
call dword [sym.imp.USER32.dll_ShowWindow]
xor ebp, ebp
test esi, esi
jbe 0x40a364
push 0x4e
push 0x20
lea ecx, [esp + 0x48]
call fcn.00409440
mov esi, dword [esp + 0x40]
cmp dword [esi - 4], 1
mov byte [esp + 0x38], 2
jle 0x40a1bd
mov ecx, dword [esi - 0xc]
push ecx
lea ecx, [esp + 0x44]
call fcn.00401270
mov esi, dword [esp + 0x40]
mov word [esi + 0x74], 0x3b
mov word [esi + 0x98], 0xd
mov word [esi + 0x9a], 0xa
mov edx, dword [0x465aac]
mov eax, dword [edx + 0xc]
mov ecx, 0x465aac
call eax
add eax, 0x10
mov dword [esp + 0x1c], eax
push ebp
lea ecx, [esp + 0x20]
push str._.8lX:
push ecx
mov byte [esp + 0x44], 3
call fcn.00407180
mov edx, dword [esp + 0x28]
push 0xa
push edx
push esi
call fcn.00430132
mov eax, dword [0x465aac]
mov edx, dword [eax + 0xc]
add esp, 0x18
mov ecx, 0x465aac
call edx
mov dword [esp + 0x28], eax
mov eax, dword [0x465aac]
mov edx, dword [eax + 0xc]
mov ecx, 0x465aac
call edx
mov dword [esp + 0x24], eax
xor ecx, ecx
lea edi, [esi + 0x78]
lea edx, [esi + 0x16]
nop
lea eax, [ecx + ebp]
cmp eax, dword [esp + 0x44]
jae 0x40a281
mov esi, dword [esp + 0x18]
lea eax, [ecx + ebp]
mov bl, byte [eax + esi]
movzx eax, bl
mov esi, eax
shr esi, 4
mov si, word [esi*2 + str.0123456789ABCDEF]
and eax, 0xf
cmp bl, 0x20
mov word [edx - 2], si
mov ax, word [eax*2 + str.0123456789ABCDEF]
mov word [edx], ax
jb 0x40a281
movsx ax, bl
mov word [edi], ax
add ecx, 1
add edi, 2
add edx, 6
cmp ecx, 0x10
jl 0x40a240
mov ecx, dword [esp + 0x20]
mov esi, dword [ecx]
mov edx, dword [esi]
mov edi, dword [esp + 0x40]
push edx
call dword [sym.imp.USER32.dll_GetWindowTextLengthW]
mov ebx, dword [sym.imp.USER32.dll_SendMessageW]
push eax
push eax
mov eax, dword [esi]
push 0xb1
push eax
call ebx
mov ecx, dword [esi]
push 0
push 0
push 0xb7
push ecx
call ebx
mov edx, dword [esi]
push edi
push 0
push 0xc2
push edx
call ebx
mov eax, dword [esp + 0x24]
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40a2ec
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x28]
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40a309
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
mov byte [esp + 0x38], 2
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40a32e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x40]
add eax, 0xfffffff0
mov byte [esp + 0x38], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40a353
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
add ebp, 0x10
cmp ebp, dword [esp + 0x44]
jb 0x40a190
mov edi, dword [esp + 0x14]
mov ecx, dword [esp + 0x20]
mov eax, dword [ecx]
mov edx, dword [eax]
push 5
push edx
call dword [sym.imp.USER32.dll_ShowWindow]
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
mov byte [esp + 0x38], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40a39a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test edi, edi
je 0x40a3a5
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0x30]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28
ret 8