Function at 0x40dfa0
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 0x4e88bb
mov eax, dword fs:[0]
push eax
sub esp, 0x9c
mov eax, dword [0x53f1e4]
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
mov esi, ecx
lea ecx, [ebp - 0x54]
call fcn.0040dc30
xor ebx, ebx
mov dword [ebp - 4], ebx
mov eax, dword [ebp - 0x54]
mov edi, 8
cmp dword [ebp - 0x40], edi
jae 0x40dfed
lea eax, [ebp - 0x54]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40e112
mov eax, dword [ebp - 0x54]
cmp dword [ebp - 0x40], edi
jae 0x40e007
lea eax, [ebp - 0x54]
push 0x507308
push eax
call fcn.004b302f
mov edi, eax
add esp, 8
cmp edi, ebx
jne 0x40e034
cmp dword [ebp - 0x40], 8
jb 0x40e02d
mov eax, dword [ebp - 0x54]
push eax
call fcn.004b1c22
add esp, 4
xor al, al
jmp 0x40e1f2
push 0x27
lea ecx, [ebp - 0x37]
push ebx
push ecx
mov byte [ebp - 0x38], bl
call fcn.004b9c60
add esp, 0xc
push edi
push 1
lea edx, [ebp - 0x38]
push 0x28
push edx
call fcn.004b3417
push edi
call fcn.004b34a1
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 0x40e070
sub eax, edx
push eax
lea eax, [ebp - 0x38]
push eax
lea ecx, [ebp - 0x70]
call fcn.004041e0
lea ecx, [ebp - 0xa8]
push ecx
lea ecx, [ebp - 0x70]
mov byte [ebp - 4], 1
call fcn.0042a4e0
add esp, 4
mov edi, eax
mov byte [ebp - 4], 2
call fcn.00404350
mov edi, 8
mov byte [ebp - 4], 1
cmp dword [ebp - 0x94], edi
jb 0x40e0c7
mov edx, dword [ebp - 0xa8]
push edx
call fcn.004b1c22
add esp, 4
cmp dword [esi + 0x10], ebx
je 0x40e0fd
cmp dword [ebp - 0x5c], 0x10
jb 0x40e0de
mov eax, dword [ebp - 0x70]
push eax
call fcn.004b1c22
add esp, 4
mov dword [ebp - 0x5c], 0xf
mov dword [ebp - 0x60], ebx
mov byte [ebp - 0x70], bl
cmp dword [ebp - 0x40], edi
jb 0x40e1f0
mov ecx, dword [ebp - 0x54]
push ecx
jmp 0x40e1e8
mov byte [ebp - 4], bl
cmp dword [ebp - 0x5c], 0x10
jb 0x40e112
mov edx, dword [ebp - 0x70]
push edx
call fcn.004b1c22
add esp, 4
mov ecx, esi
call fcn.0040db40
test al, al
jne 0x40e144
push 0x50730c
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
cmp dword [ebp - 0x40], edi
jb 0x40e02d
mov eax, dword [ebp - 0x54]
push eax
call fcn.004b1c22
add esp, 4
xor al, al
jmp 0x40e1f2
mov eax, dword [ebp - 0x54]
cmp dword [ebp - 0x40], edi
jae 0x40e14f
lea eax, [ebp - 0x54]
push 0x50733c
push eax
call fcn.004b302f
mov edi, eax
add esp, 8
cmp edi, ebx
jne 0x40e17d
cmp dword [ebp - 0x40], 8
jb 0x40e02d
mov ecx, dword [ebp - 0x54]
push ecx
call fcn.004b1c22
add esp, 4
xor al, al
jmp 0x40e1f2
lea edx, [ebp - 0x8c]
push edx
mov ecx, esi
call fcn.0042a680
mov eax, dword [ebp - 0x8c]
mov esi, 0x10
add esp, 4
cmp dword [ebp - 0x78], esi
jae 0x40e1a4
lea eax, [ebp - 0x8c]
mov ecx, dword [ebp - 0x7c]
push edi
push 1
push ecx
push eax
call fcn.004b3fc5
push edi
call fcn.004b34a1
add esp, 0x14
cmp dword [ebp - 0x78], esi
jb 0x40e1ce
mov edx, dword [ebp - 0x8c]
push edx
call fcn.004b1c22
add esp, 4
cmp dword [ebp - 0x40], 8
mov dword [ebp - 0x78], 0xf
mov dword [ebp - 0x7c], ebx
mov byte [ebp - 0x8c], bl
jb 0x40e1f0
mov eax, dword [ebp - 0x54]
push eax
call fcn.004b1c22
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.004b1c2d
mov esp, ebp
pop ebp
ret