Function at 0x4089c9
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
cmp dword [ebp + 0xc], 0
push esi
mov esi, ecx
jne 0x4089dd
mov al, 1
jmp 0x408ac9
cmp dword [esi + 0xc], 1
jne 0x4089ee
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov dword [esi + 4], eax
push ebx
push edi
xor edi, edi
xor bl, bl
mov dword [ebp - 4], edi
cmp dword [esi + 0xc], edi
je 0x408a3f
cmp dword [ebp + 0xc], edi
jbe 0x408a60
mov ecx, dword [ebp + 0xc]
sub ecx, edi
mov eax, 0x4000
cmp ecx, eax
jae 0x408a11
mov eax, ecx
push 0
lea ecx, [ebp - 4]
push ecx
push eax
mov eax, dword [ebp + 8]
add eax, edi
push eax
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ebx, eax
dec ebx
neg ebx
sbb bl, bl
inc bl
je 0x408a60
add edi, 0x4000
cmp edi, dword [ebp + 0xc]
jb 0x408a01
jmp 0x408a5c
push edi
lea eax, [ebp - 4]
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ebx, eax
dec ebx
neg ebx
sbb bl, bl
inc bl
test bl, bl
jne 0x408ac1
cmp byte [esi + 0x14], 0
je 0x408ac1
cmp dword [esi + 0xc], 0
jne 0x408ac1
push 0
lea eax, [esi + 0x1e]
mov edi, 0x4325ac
push eax
mov ecx, edi
call fcn.0040632e
test al, al
je 0x408ab4
mov eax, dword [ebp - 4]
cmp eax, dword [ebp + 0xc]
jae 0x4089f0
test eax, eax
jbe 0x4089f0
mov ebx, dword [esi]
push 0
mov ecx, esi
call dword [ebx + 0x10]
mov ecx, dword [ebp - 4]
xor edi, edi
sub eax, ecx
sbb edx, edi
push edx
push eax
mov ecx, esi
call dword [ebx + 0xc]
jmp 0x4089f0
lea eax, [esi + 0x1e]
push eax
push 0
mov ecx, edi
call fcn.0040647d
pop edi
mov al, bl
mov byte [esi + 8], 1
pop ebx
pop esi
leave
ret 8

Function at 0x408bc0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
mov esi, ecx
cmp dword [esi + 0xc], 1
push edi
jne 0x408bda
push 0xfffffffffffffff6
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov dword [esi + 4], eax
push 0
lea eax, [ebp - 4]
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x408c4b
mov ecx, esi
call fcn.00408b7a
test al, al
je 0x408c15
mov eax, 0x4e20
cmp dword [ebp + 0xc], eax
jbe 0x408c15
push eax
push dword [ebp + 8]
mov ecx, esi
call fcn.00408bc0
jmp 0x408c4e
cmp dword [esi + 0xc], 1
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
jne 0x408c2c
call ebx
cmp eax, 0x6d
jne 0x408c2c
xor eax, eax
jmp 0x408c4e
cmp dword [esi + 0xc], 0
jne 0x408c46
mov edi, 0x8000
cmp dword [ebp + 0xc], edi
jbe 0x408c46
call ebx
cmp eax, 0x21
jne 0x408c46
push edi
jmp 0x408c09
or eax, 0xffffffff
jmp 0x408c4e
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
leave
ret 8

Function at 0x408f61
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1000
call fcn.0041a860
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push edi
push dword [ebp + 8]
call esi
mov edi, eax
cmp edi, 0xffffffff
jne 0x408fa5
push 0x800
lea eax, [ebp - 0x1000]
push eax
push dword [ebp + 8]
call fcn.0040a77b
test al, al
je 0x408fa5
lea eax, [ebp - 0x1000]
push eax
call esi
mov edi, eax
mov eax, edi
pop edi
pop esi
leave
ret 4