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

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x458f05
push eax
mov dword fs:[0], esp
sub esp, 0x43c
push ebx
push ebp
push esi
push edi
mov edi, ecx
lea ebp, [edi + 4]
call fcn.00403780
mov esi, eax
test esi, esi
jne 0x40ae09
mov eax, 0x80004005
jmp 0x40affa
mov eax, dword [ebp]
test eax, eax
je 0x40ae16
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov dword [ebp], 0
mov edx, dword [esi]
push ebp
push esi
call dword [edx + 0x78]
test eax, eax
jl 0x40affa
mov ebx, dword [esp + 0x45c]
lea esi, [edi + 8]
mov eax, dword [ebx]
test eax, eax
je 0x40ae46
add eax, 8
push eax
call dword [0x45d1b4]
mov ecx, esi
call fcn.00409ee0
mov eax, dword [ebx]
mov dword [esi], eax
mov esi, dword [esp + 0x460]
mov dword [edi + 0x10], esi
mov eax, dword [ebp]
test eax, eax
jne 0x40ae6c
push 0x80004003
call fcn.00457710
mov eax, dword [ebp]
push 0xffffffffffffffff
push eax
mov ecx, dword [eax]
call dword [ecx + 0x4c]
cmp dword [ebp], 0
jne 0x40ae87
push 0x80004003
call fcn.00457710
mov eax, dword [ebp]
push 0
push eax
mov edx, dword [eax]
call dword [edx + 0x50]
test esi, esi
je 0x40b015
push 0xc
call fcn.00458152
add esp, 4
mov dword [esp + 0x14], eax
test eax, eax
mov dword [esp + 0x454], 0
je 0x40aec5
push str.version1.0_encodingutf_8
mov ecx, eax
call fcn.00409f30
jmp 0x40aec7
xor eax, eax
test eax, eax
mov dword [esp + 0x454], 0xffffffff
mov dword [esp + 0x18], eax
jne 0x40aee4
push 0x8007000e
call fcn.00457710
push 0
mov ecx, ebp
mov dword [esp + 0x458], 1
call fcn.0040d5a0
test al, al
je 0x40af09
mov dword [esp + 0x10], 0x80004005
jmp 0x40afc6
mov eax, dword [edi + 0xc]
lea esi, [edi + 0xc]
xor ebx, ebx
cmp eax, ebx
je 0x40af26
mov eax, dword [eax]
cmp eax, ebx
je 0x40af26
push eax
call dword [0x45d354]
cmp eax, ebx
ja 0x40af32
push str.version1.0_encodingutf_16
mov ecx, esi
call fcn.0040b380
mov dword [esp + 0x10], ebx
lea ecx, [esp + 0x10]
mov byte [esp + 0x454], 2
call fcn.0040d6a0
mov eax, dword [esi]
mov dword [esp + 0x10], ebx
cmp eax, ebx
je 0x40af55
mov edi, dword [eax]
jmp 0x40af57
xor edi, edi
push 0x4647f4
lea ecx, [esp + 0x18]
call fcn.0040b2e0
mov eax, dword [eax]
mov byte [esp + 0x454], 3
cmp eax, ebx
je 0x40af77
mov esi, dword [eax]
jmp 0x40af79
xor esi, esi
mov ecx, ebp
call fcn.0040d400
mov ecx, dword [eax]
lea edx, [esp + 0x10]
push edx
push edi
push esi
push eax
call dword [ecx + 0x48]
lea ecx, [esp + 0x14]
mov esi, eax
mov byte [esp + 0x454], 2
call fcn.00409ee0
cmp esi, ebx
jl 0x40afb9
mov ecx, ebp
call fcn.0040d400
mov edx, dword [esp + 0x10]
mov ecx, dword [eax]
push ebx
push edx
push eax
call dword [ecx + 0xc]
mov esi, eax
lea ecx, [esp + 0x10]
call fcn.0040d6a0
mov dword [esp + 0x10], esi
lea ecx, [esp + 0x18]
mov dword [esp + 0x454], 0xffffffff
call fcn.00409ee0
mov eax, dword [esp + 0x10]
test eax, eax
jge 0x40aff6
mov eax, dword [ebp]
test eax, eax
je 0x40aff6
mov dword [ebp], 0
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x44c]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x448
ret 8
mov eax, dword [ebx]
mov dword [esp + 0x14], 0
test eax, eax
je 0x40b027
mov eax, dword [eax]
jmp 0x40b029
xor eax, eax
push eax
call dword [0x45d394]
test eax, eax
je 0x40b0ed
mov ebx, dword [ebx]
mov word [esp + 0x1c], 8
test ebx, ebx
je 0x40b049
mov esi, dword [ebx]
jmp 0x40b04b
xor esi, esi
push esi
call dword [0x45d370]
push eax
push esi
call dword [0x45d34c]
test eax, eax
mov dword [esp + 0x24], eax
jne 0x40b070
push 0x8007000e
call fcn.00457710
mov eax, dword [esp + 0x24]
mov esi, dword [esp + 0x1c]
mov ebx, dword [esp + 0x20]
mov edi, eax
mov eax, dword [esp + 0x28]
mov dword [esp + 0x38], eax
mov eax, dword [ebp]
test eax, eax
mov dword [esp + 0x454], 4
jne 0x40b09e
push 0x80004003
call fcn.00457710
lea edx, [esp + 0x14]
mov eax, dword [ebp]
push edx
sub esp, 0x10
mov ecx, dword [eax]
mov edx, esp
push eax
mov dword [edx], esi
mov esi, dword [esp + 0x50]
mov dword [edx + 4], ebx
mov dword [edx + 8], edi
mov dword [edx + 0xc], esi
call dword [ecx + 0x30]
mov dword [esp + 0x10], eax
lea eax, [esp + 0x1c]
push eax
mov dword [esp + 0x458], 0xffffffff
call dword [0x45d374]
test eax, eax
jge 0x40b2c6
push eax
call fcn.00457710
jmp 0x40b2c6
mov dword [esp + 0x10], 0x80004005
call fcn.00403780
test eax, eax
je 0x40b2c6
mov ecx, dword [eax]
push eax
call dword [ecx + 0x6c]
mov esi, eax
test esi, esi
je 0x40b2c6
mov ebx, dword [ebx]
test ebx, ebx
je 0x40b11c
mov eax, dword [ebx]
jmp 0x40b11e
xor eax, eax
mov edx, dword [esi]
push eax
push 0
push esi
call dword [edx + 0x10]
mov ebx, eax
test ebx, ebx
jle 0x40b2c6
push ebx
call dword [0x45d32c]
mov edi, eax
add esp, 4
test edi, edi
mov dword [esp + 0x18], edi
je 0x40b2c6
mov ecx, ebx
xor eax, eax
mov edx, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [esp + 0x45c]
mov eax, dword [eax]
test eax, eax
je 0x40b16c
mov eax, dword [eax]
jmp 0x40b16e
xor eax, eax
mov edx, dword [esp + 0x18]
mov ecx, dword [esi]
push ebx
push edx
push eax
push 0
push esi
call dword [ecx + 0x14]
mov ecx, 0x82
xor eax, eax
lea edi, [esp + 0x244]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x244]
push eax
push 0x104
call dword [0x45d178]
mov ecx, 0x82
xor eax, eax
lea edi, [esp + 0x3c]
lea edx, [esp + 0x3c]
rep stosd dword es:[edi], eax
mov eax, dword [0x4647b0]
push edx
mov ecx, eax
inc eax
mov dword [0x4647b0], eax
push ecx
lea eax, [esp + 0x24c]
push 0x4647a8
push eax
call dword [0x45d17c]
lea ecx, [esp + 0x3c]
push 0x4647a0
push ecx
call dword [0x45d308]
mov esi, eax
add esp, 8
test esi, esi
je 0x40b2b8
mov edx, dword [esp + 0x18]
push esi
push 1
push ebx
push edx
call dword [0x45d30c]
push esi
call dword [0x45d310]
add esp, 0x14
lea eax, [esp + 0x3c]
mov word [esp + 0x2c], 8
push eax
call dword [0x45d36c]
test eax, eax
mov dword [esp + 0x34], eax
jne 0x40b239
lea ecx, [esp + 0x3c]
test ecx, ecx
je 0x40b239
push 0x8007000e
call fcn.00457710
mov eax, dword [esp + 0x34]
mov edx, dword [esp + 0x38]
mov esi, dword [esp + 0x2c]
mov edi, dword [esp + 0x30]
mov ebx, eax
mov eax, dword [ebp]
mov dword [esp + 0x454], 5
test eax, eax
mov dword [esp + 0x28], edx
jne 0x40b267
push 0x80004003
call fcn.00457710
lea edx, [esp + 0x14]
mov eax, dword [ebp]
push edx
sub esp, 0x10
mov ecx, dword [eax]
mov edx, esp
push eax
mov dword [edx], esi
mov esi, dword [esp + 0x40]
mov dword [edx + 4], edi
mov dword [edx + 8], ebx
mov dword [edx + 0xc], esi
call dword [ecx + 0x30]
mov dword [esp + 0x10], eax
lea eax, [esp + 0x2c]
push eax
mov dword [esp + 0x458], 0xffffffff
call dword [0x45d374]
test eax, eax
jge 0x40b2ad
push eax
call fcn.00457710
lea ecx, [esp + 0x3c]
push ecx
call dword [0x45d180]
mov edx, dword [esp + 0x18]
push edx
call dword [0x45d338]
add esp, 4
cmp word [esp + 0x14], 0
jne 0x40afda
mov dword [esp + 0x10], 0x80004005
jmp 0x40afe2