Function at 0x4038d8
Capabilities:
Check if file exists
Write file on windows

Disassembly:
mov eax, 0x45f9c0
call fcn.00452e40
sub esp, 0x43c
push ebx
push esi
mov esi, ecx
push edi
lea ebx, [esi + 4]
push ebx
call fcn.00403c1a
xor edi, edi
pop ecx
cmp eax, edi
jl 0x403a2c
mov eax, dword [ebp + 8]
mov eax, dword [eax]
cmp eax, edi
je 0x403914
add eax, 8
push eax
call dword [0x464254]
lea ecx, [esi + 8]
call fcn.00403143
mov eax, dword [ebp + 8]
mov eax, dword [eax]
mov dword [esi + 8], eax
mov eax, dword [ebp + 0xc]
mov dword [esi + 0x10], eax
cmp dword [ebx], edi
jne 0x403938
push 0x80004003
call fcn.00444c33
mov eax, dword [ebx]
push 0xffffffffffffffff
push eax
mov ecx, dword [eax]
call dword [ecx + 0x4c]
cmp dword [ebx], edi
jne 0x403950
push 0x80004003
call fcn.00444c33
mov eax, dword [ebx]
push edi
push eax
mov ecx, dword [eax]
call dword [ecx + 0x50]
cmp dword [ebp + 0xc], edi
je 0x403991
push str.version1.0_encodingutf_8
lea ecx, [ebp + 8]
call fcn.004030ef
lea eax, [ebp + 8]
mov ecx, esi
push eax
mov dword [ebp - 4], edi
call fcn.00403c5c
mov ecx, dword [ebp + 8]
mov dword [ebp + 0xc], eax
cmp ecx, edi
je 0x403a1c
call fcn.0040318a
jmp 0x403a1c
mov esi, dword [ebp + 8]
mov dword [ebp - 0x18], edi
mov eax, dword [esi]
cmp eax, edi
je 0x4039a1
mov eax, dword [eax]
jmp 0x4039a3
xor eax, eax
push eax
call dword [0x464440]
test eax, eax
je 0x403a3d
push esi
lea ecx, [ebp - 0x38]
call fcn.00403bda
mov esi, eax
lea edi, [ebp - 0x28]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
cmp dword [ebx], 0
mov dword [ebp - 4], 1
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
jne 0x4039da
push 0x80004003
call fcn.00444c33
lea edx, [ebp - 0x18]
lea esi, [ebp - 0x28]
push edx
mov eax, dword [ebx]
sub esp, 0x10
mov edi, esp
mov ecx, dword [eax]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
push eax
movsd dword es:[edi], dword [esi]
call dword [ecx + 0x30]
or dword [ebp - 4], 0xffffffff
mov dword [ebp + 0xc], eax
lea eax, [ebp - 0x38]
push eax
call dword [0x4643f4]
test eax, eax
jge 0x403a0d
push eax
call fcn.00444c33
xor edi, edi
cmp word [ebp - 0x18], di
jne 0x403a1c
mov dword [ebp + 0xc], 0x80004005
cmp dword [ebp + 0xc], edi
jge 0x403a29
push edi
mov ecx, ebx
call fcn.004046a7
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret 8
mov dword [ebp + 0xc], 0x80004005
call fcn.00403c4b
mov esi, eax
cmp esi, edi
je 0x403a0f
mov eax, dword [ebp + 8]
mov eax, dword [eax]
cmp eax, edi
je 0x403a5c
mov eax, dword [eax]
jmp 0x403a5e
xor eax, eax
mov ecx, dword [esi]
push eax
push edi
push esi
call dword [ecx + 0x10]
cmp eax, edi
mov dword [ebp - 0x14], eax
jle 0x403a0f
push eax
call dword [0x464394]
cmp eax, edi
pop ecx
mov dword [ebp - 0x10], eax
je 0x403a0f
push dword [ebp - 0x14]
push edi
push eax
call fcn.00452e6c
mov eax, dword [ebp + 8]
add esp, 0xc
mov eax, dword [eax]
cmp eax, edi
je 0x403a96
mov eax, dword [eax]
jmp 0x403a98
xor eax, eax
push dword [ebp - 0x14]
mov ecx, dword [esi]
push dword [ebp - 0x10]
push eax
push edi
push esi
call dword [ecx + 0x14]
mov esi, 0x208
lea eax, [ebp - 0x448]
push esi
push edi
push eax
call fcn.00452e6c
add esp, 0xc
lea eax, [ebp - 0x448]
push eax
push 0x104
call dword [0x464228]
push esi
lea eax, [ebp - 0x240]
push edi
push eax
call fcn.00452e6c
mov eax, dword [0x47160c]
add esp, 0xc
inc dword [0x47160c]
lea ecx, [ebp - 0x240]
push ecx
push eax
lea eax, [ebp - 0x448]
push 0x471604
push eax
call dword [0x46422c]
lea eax, [ebp - 0x240]
push 0x4715fc
push eax
call dword [0x464398]
mov esi, eax
pop ecx
cmp esi, edi
pop ecx
je 0x403bcb
push esi
push 1
push dword [ebp - 0x14]
push dword [ebp - 0x10]
call dword [0x46439c]
push esi
call dword [0x4643a0]
add esp, 0x14
lea eax, [ebp - 0x240]
mov word [ebp - 0x28], 8
push eax
call dword [0x4643fc]
cmp eax, edi
mov dword [ebp - 0x20], eax
jne 0x403b69
lea eax, [ebp - 0x240]
test eax, eax
je 0x403b69
push 0x8007000e
call fcn.00444c33
lea esi, [ebp - 0x28]
lea edi, [ebp - 0x38]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
cmp dword [ebx], 0
mov dword [ebp - 4], 2
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
jne 0x403b89
push 0x80004003
call fcn.00444c33
lea edx, [ebp - 0x18]
lea esi, [ebp - 0x38]
push edx
mov eax, dword [ebx]
sub esp, 0x10
mov edi, esp
mov ecx, dword [eax]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
push eax
movsd dword es:[edi], dword [esi]
call dword [ecx + 0x30]
or dword [ebp - 4], 0xffffffff
mov dword [ebp + 0xc], eax
lea eax, [ebp - 0x28]
push eax
call dword [0x4643f4]
test eax, eax
jge 0x403bbc
push eax
call fcn.00444c33
lea eax, [ebp - 0x240]
push eax
call dword [0x464230]
xor edi, edi
push dword [ebp - 0x10]
call dword [0x4643a4]
pop ecx
jmp 0x403a0f