Function at 0x40c9b0
Capabilities:
Check if file exists
Print debug messages
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4ec9ab
mov eax, dword fs:[0]
push eax
sub esp, 0x9c
mov eax, dword [0x5441b4]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
lea eax, [ebp - 0x54]
push eax
mov esi, ecx
call fcn.0040c730
add esp, 4
xor ebx, ebx
mov dword [ebp - 4], ebx
mov eax, dword [ebp - 0x54]
mov edi, 8
cmp dword [ebp - 0x40], edi
jae 0x40ca01
lea eax, [ebp - 0x54]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40cb26
mov eax, dword [ebp - 0x54]
cmp dword [ebp - 0x40], edi
jae 0x40ca1b
lea eax, [ebp - 0x54]
push 0x50c328
push eax
call fcn.004b72a3
mov edi, eax
add esp, 8
cmp edi, ebx
jne 0x40ca48
cmp dword [ebp - 0x40], 8
jb 0x40ca41
mov ecx, dword [ebp - 0x54]
push ecx
call fcn.004b6106
add esp, 4
xor al, al
jmp 0x40cc06
push 0x27
lea edx, [ebp - 0x37]
push ebx
push edx
mov byte [ebp - 0x38], bl
call fcn.004be120
add esp, 0xc
push edi
push 1
lea eax, [ebp - 0x38]
push 0x28
push eax
call fcn.004b768b
push edi
call fcn.004b7715
lea eax, [ebp - 0x38]
add esp, 0x14
mov dword [ebp - 0x5c], 0xf
mov dword [ebp - 0x60], ebx
mov byte [ebp - 0x70], bl
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x40ca84
sub eax, edx
push eax
lea ecx, [ebp - 0x38]
push ecx
lea ecx, [ebp - 0x70]
call fcn.00406bf0
lea edx, [ebp - 0xa8]
push edx
lea ecx, [ebp - 0x70]
mov byte [ebp - 4], 1
call fcn.0040eee0
add esp, 4
mov edi, eax
mov byte [ebp - 4], 2
call fcn.00406400
mov edi, 8
mov byte [ebp - 4], 1
cmp dword [ebp - 0x94], edi
jb 0x40cadb
mov eax, dword [ebp - 0xa8]
push eax
call fcn.004b6106
add esp, 4
cmp dword [esi + 0x10], ebx
je 0x40cb11
cmp dword [ebp - 0x5c], 0x10
jb 0x40caf2
mov ecx, dword [ebp - 0x70]
push ecx
call fcn.004b6106
add esp, 4
mov dword [ebp - 0x5c], 0xf
mov dword [ebp - 0x60], ebx
mov byte [ebp - 0x70], bl
cmp dword [ebp - 0x40], edi
jb 0x40cc04
mov edx, dword [ebp - 0x54]
push edx
jmp 0x40cbfc
mov byte [ebp - 4], bl
cmp dword [ebp - 0x5c], 0x10
jb 0x40cb26
mov eax, dword [ebp - 0x70]
push eax
call fcn.004b6106
add esp, 4
mov ecx, esi
call fcn.0040c640
test al, al
jne 0x40cb58
push 0x50c32c
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
cmp dword [ebp - 0x40], edi
jb 0x40ca41
mov ecx, dword [ebp - 0x54]
push ecx
call fcn.004b6106
add esp, 4
xor al, al
jmp 0x40cc06
mov eax, dword [ebp - 0x54]
cmp dword [ebp - 0x40], edi
jae 0x40cb63
lea eax, [ebp - 0x54]
push 0x50c35c
push eax
call fcn.004b72a3
mov edi, eax
add esp, 8
cmp edi, ebx
jne 0x40cb91
cmp dword [ebp - 0x40], 8
jb 0x40ca41
mov edx, dword [ebp - 0x54]
push edx
call fcn.004b6106
add esp, 4
xor al, al
jmp 0x40cc06
lea eax, [ebp - 0x8c]
push eax
mov ecx, esi
call fcn.0040ee10
mov eax, dword [ebp - 0x8c]
mov esi, 0x10
add esp, 4
cmp dword [ebp - 0x78], esi
jae 0x40cbb8
lea eax, [ebp - 0x8c]
mov ecx, dword [ebp - 0x7c]
push edi
push 1
push ecx
push eax
call fcn.004b7b74
push edi
call fcn.004b7715
add esp, 0x14
cmp dword [ebp - 0x78], esi
jb 0x40cbe2
mov edx, dword [ebp - 0x8c]
push edx
call fcn.004b6106
add esp, 4
cmp dword [ebp - 0x40], 8
mov dword [ebp - 0x78], 0xf
mov dword [ebp - 0x7c], ebx
mov byte [ebp - 0x8c], bl
jb 0x40cc04
mov eax, dword [ebp - 0x54]
push eax
call fcn.004b6106
add esp, 4
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004b6111
mov esp, ebp
pop ebp
ret