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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x439fc0
mov eax, dword fs:[0]
push eax
sub esp, 0x24
push ebx
push esi
push edi
mov eax, dword [0x44bb64]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [ebp - 0x1c], ebx
xor esi, esi
xor edi, edi
mov dword [ebp - 0x30], edi
mov dword [ebp - 0x2c], esi
mov eax, dword [ebp + 8]
mov eax, dword [eax]
push esi
push 0x80
push 3
push esi
push 1
push 0x80000000
push eax
mov dword [ebp - 4], esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
jne 0x40c6b2
call fcn.004021e0
jmp 0x40c6ba
mov dword [ebp - 0x30], eax
mov edi, dword [ebp - 0x30]
xor eax, eax
push eax
call fcn.0041d2c0
mov edx, dword [0x44bb48]
mov eax, dword [edx + 0xc]
add esp, 4
mov ecx, 0x44bb48
call eax
add eax, 0x10
mov dword [ebp - 0x10], eax
lea ecx, [ebp - 0x24]
push ecx
push edi
mov byte [ebp - 4], 1
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x28], eax
cmp eax, 0xffffffff
jne 0x40c701
call fcn.004021e0
cmp eax, esi
jge 0x40c6fe
mov esi, dword [ebp - 0x28]
jmp 0x40c70b
mov eax, dword [ebp - 0x28]
mov edx, dword [ebp - 0x24]
mov esi, eax
mov dword [ebp - 0x24], edx
xor eax, eax
push eax
call fcn.0041d2c0
mov eax, dword [ebp + 0xc]
add esp, 4
cmp esi, eax
jae 0x40c720
mov dword [ebp - 0x14], esi
jmp 0x40c725
mov dword [ebp - 0x14], eax
mov esi, eax
test esi, esi
jns 0x40c733
push 0x80070057
call fcn.00401210
mov edx, dword [ebp - 0x10]
mov eax, dword [edx - 8]
mov ecx, 1
sub ecx, dword [edx - 4]
sub eax, esi
or eax, ecx
jge 0x40c753
push esi
lea ecx, [ebp - 0x10]
call fcn.00409600
mov edx, dword [ebp - 0x10]
push 0
lea eax, [ebp + 8]
push eax
push esi
push edx
push edi
mov dword [ebp + 8], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40c774
call fcn.004021e0
jmp 0x40c782
mov eax, dword [ebp + 8]
sub eax, esi
neg eax
sbb eax, eax
and eax, 0x80070026
push eax
call fcn.0041d2c0
add esp, 4
test edi, edi
je 0x40c7a0
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x30], 0
mov edi, dword [ebp - 0x30]
mov eax, dword [ebx]
mov ecx, dword [eax]
push 0x43c7e8
push ecx
call dword [sym.imp.USER32.dll_SetWindowTextW]
mov eax, dword [ebx]
mov edx, dword [eax]
push 0
push edx
call dword [sym.imp.USER32.dll_ShowWindow]
mov dword [ebp + 0xc], 0
test esi, esi
je 0x40c992
push 0x4e
push 0x20
lea ecx, [ebp + 8]
call fcn.0040af30
mov esi, dword [ebp + 8]
cmp dword [esi - 4], 1
mov byte [ebp - 4], 2
jle 0x40c7f4
mov eax, dword [esi - 0xc]
push eax
lea ecx, [ebp + 8]
call fcn.004012a0
mov esi, dword [ebp + 8]
mov ecx, 0x3b
mov word [esi + 0x74], cx
mov dword [esi + 0x98], 0xa000d
mov edx, dword [0x44bb48]
mov eax, dword [edx + 0xc]
mov ecx, 0x44bb48
call eax
add eax, 0x10
mov dword [ebp - 0x18], eax
mov ebx, dword [ebp + 0xc]
push ebx
lea ecx, [ebp - 0x18]
push str._.8lX:
push ecx
mov byte [ebp - 4], 3
call fcn.00406d30
mov edx, dword [ebp - 0x18]
push 0xa
push edx
push esi
call fcn.0042576d
mov eax, dword [0x44bb48]
mov edx, dword [eax + 0xc]
add esp, 0x18
mov ecx, 0x44bb48
call edx
mov dword [ebp - 0x24], eax
mov eax, dword [0x44bb48]
mov edx, dword [eax + 0xc]
mov ecx, 0x44bb48
call edx
mov dword [ebp - 0x20], eax
xor ecx, ecx
lea edi, [esi + 0x78]
lea edx, [esi + 0x16]
jmp 0x40c873
mov ebx, dword [ebp + 0xc]
lea eax, [ecx + ebx]
cmp eax, dword [ebp - 0x14]
jae 0x40c8b2
mov esi, dword [ebp - 0x10]
lea eax, [ecx + ebx]
mov bl, byte [eax + esi]
movzx eax, bl
mov esi, eax
shr esi, 4
mov si, word [esi*2 + str.0123456789ABCDEF]
and eax, 0xf
mov word [edx - 2], si
mov ax, word [eax*2 + str.0123456789ABCDEF]
mov word [edx], ax
cmp bl, 0x20
jb 0x40c8b2
movsx ax, bl
mov word [edi], ax
inc ecx
add edi, 2
add edx, 6
cmp ecx, 0x10
jl 0x40c870
mov ecx, dword [ebp - 0x1c]
mov esi, dword [ecx]
mov edx, dword [esi]
mov ebx, dword [ebp + 8]
push edx
call dword [sym.imp.USER32.dll_GetWindowTextLengthW]
mov edi, dword [sym.imp.USER32.dll_SendMessageW]
push eax
push eax
mov eax, dword [esi]
push 0xb1
push eax
call edi
mov ecx, dword [esi]
push 0
push 0
push 0xb7
push ecx
call edi
mov edx, dword [esi]
push ebx
push 0
push 0xc2
push edx
call edi
mov eax, dword [ebp - 0x20]
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40c918
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x24]
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40c934
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x18]
add eax, 0xfffffff0
mov byte [ebp - 4], 2
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40c957
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
mov byte [ebp - 4], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40c97a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp + 0xc]
add eax, 0x10
mov dword [ebp + 0xc], eax
cmp eax, dword [ebp - 0x14]
jb 0x40c7cc
mov ebx, dword [ebp - 0x1c]
mov edi, dword [ebp - 0x30]
mov eax, dword [ebx]
mov ecx, dword [eax]
push 5
push ecx
call dword [sym.imp.USER32.dll_ShowWindow]
mov eax, dword [ebp - 0x10]
add eax, 0xfffffff0
mov byte [ebp - 4], 0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40c9c2
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test edi, edi
je 0x40c9cd
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8