Function at 0x412050
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x68
mov eax, dword [0x46d750]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
call dword [0x46eaf4]
push 0xa
lea ecx, [ebp - 0x5c]
mov ebx, eax
call fcn.00429689
lea eax, [ebp - 0x5c]
push eax
mov eax, dword [ebp + 8]
push ecx
add eax, 0xfffffff0
mov dword [ebp - 0x1c], esp
mov esi, esp
push eax
mov dword [ebp - 0x14], eax
call fcn.004020e0
add eax, 0x10
add esp, 4
mov dword [esi], eax
call fcn.0040b770
add esp, 8
cmp eax, 3
je 0x41210c
lea ecx, [ebp - 0x1c]
push str._WriteXml__Invalid_arguments__nArg_3_:
push ecx
lea ecx, [ebp + 8]
call fcn.00401eb0
mov edi, dword [eax]
xor esi, esi
add esp, 8
cmp edi, esi
jne 0x4120c4
mov dword [ebp - 0xc], esi
jmp 0x4120f2
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
add eax, 1
cmp eax, 0x3fffffff
jle 0x4120da
mov dword [ebp - 0xc], esi
jmp 0x4120f2
lea esi, [eax + eax]
mov eax, esi
call fcn.00440090
mov eax, esp
push ebx
push esi
push edi
push eax
call fcn.00408150
mov dword [ebp - 0xc], eax
lea edx, [ebp - 0xc]
push edx
lea ecx, [ebp - 0x68]
call fcn.0043920e
push 0x467390
lea eax, [ebp - 0x68]
push eax
call fcn.0043b69a
push 0
lea ecx, [ebp - 0x5c]
call fcn.00429665
test eax, eax
jne 0x41211f
jmp fcn.004232a7
mov eax, dword [eax + 8]
sub eax, 0x10
push eax
call fcn.004020e0
mov edi, eax
add esp, 4
add edi, 0x10
push edi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4124b4
push 1
lea ecx, [ebp - 0x5c]
call fcn.00429665
test eax, eax
jne 0x412155
jmp fcn.004232a7
mov eax, dword [eax + 8]
sub eax, 0x10
push eax
call fcn.004020e0
mov esi, eax
add esp, 4
add esi, 0x10
push 2
lea ecx, [ebp - 0x5c]
mov dword [ebp - 0x24], esi
call fcn.00429665
test eax, eax
jne 0x41217f
jmp fcn.004232a7
mov eax, dword [eax + 8]
sub eax, 0x10
push eax
call fcn.004020e0
push str.r_ccsUTF_8
mov ebx, eax
lea ecx, [ebp - 0x18]
push edi
add ebx, 0x10
push ecx
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x18], 0
call fcn.0043ae95
mov eax, dword [ebp - 0x18]
add esp, 0x10
test eax, eax
jne 0x4121d7
lea eax, [ebx - 0x10]
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4121cf
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [esi - 0x10]
jmp 0x41249b
push eax
lea ecx, [ebp - 0x40]
call fcn.00424db5
call fcn.00423381
test eax, eax
jne 0x4121f3
push 0x80004005
call fcn.00402160
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
mov esi, eax
add esi, 0x10
mov dword [ebp - 0xc], esi
call fcn.00423381
test eax, eax
jne 0x412217
push 0x80004005
call fcn.00402160
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
push 0x460ea0
lea ecx, [ebp - 0x10]
push 0x460ea4
add eax, 0x10
push ecx
lea ecx, [ebp - 0x24]
mov dword [ebp - 8], eax
call fcn.00401eb0
add esp, 8
push eax
lea edx, [ebp - 0x28]
push edx
call fcn.00401dd0
mov eax, dword [ebp - 0x10]
add eax, 0xfffffff0
add esp, 0xc
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41226b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push 0x460ea0
lea ecx, [ebp - 0x10]
push 0x460ea8
push ecx
lea ecx, [ebp - 0x24]
call fcn.00401eb0
add esp, 8
push eax
lea edx, [ebp - 0x20]
push edx
call fcn.00401dd0
mov eax, dword [ebp - 0x10]
add eax, 0xfffffff0
add esp, 0xc
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4122b0
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [ebp - 8]
push ecx
lea ecx, [ebp - 0x40]
call fcn.00425353
test eax, eax
je 0x4123cf
mov eax, dword [ebp - 0x28]
test eax, eax
je 0x412399
mov ecx, dword [ebp - 8]
cmp dword [ecx - 0xc], 0
jl 0x41239c
push eax
push ecx
call fcn.0043a679
add esp, 8
test eax, eax
je 0x412399
mov ecx, dword [ebp - 8]
sub eax, ecx
sar eax, 1
cmp eax, 0xffffffff
je 0x41239c
mov eax, dword [ebp - 0x20]
test eax, eax
je 0x41239c
cmp dword [ecx - 0xc], 0
jl 0x41239c
push eax
push ecx
call fcn.0043a679
add esp, 8
test eax, eax
je 0x412399
mov ecx, dword [ebp - 8]
sub eax, ecx
sar eax, 1
cmp eax, 0xffffffff
je 0x41239c
lea edx, [ebp - 0x20]
push edx
lea eax, [ebp - 0x2c]
push eax
lea ecx, [ebp - 0x28]
push ecx
lea edx, [ebp - 0x1c]
push edx
call fcn.00413f20
add esp, 0xc
push eax
lea eax, [ebp - 0x10]
push eax
call fcn.00413f20
add esp, 0xc
push eax
lea ecx, [ebp - 8]
call fcn.00402800
mov eax, dword [ebp - 0x10]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41237a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x1c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x412399
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [ebp - 8]
mov edx, dword [ecx - 0xc]
push edx
push ecx
lea ecx, [ebp - 0xc]
call fcn.00407cf0
push 1
push 0x460c30
lea ecx, [ebp - 0xc]
call fcn.00407cf0
lea eax, [ebp - 8]
push eax
lea ecx, [ebp - 0x40]
call fcn.00425353
test eax, eax
jne 0x4122c4
mov esi, dword [ebp - 0xc]
push 0
push 0
lea ecx, [ebp - 0x40]
call fcn.004265e1
lea ecx, [ebp - 0x40]
call fcn.00425182
push esi
lea ecx, [ebp - 0x40]
call fcn.00424fd3
mov ecx, dword [ebp - 0x18]
push ecx
call fcn.0043af58
mov eax, dword [ebp - 0x20]
add eax, 0xfffffff0
add esp, 4
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x412417
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x28]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x412436
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 8]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x412455
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [esi - 0x10]
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x412471
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [ebp - 0x40]
call fcn.00425220
lea eax, [ebx - 0x10]
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x412495
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x24]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4124b4
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [edi - 0x10]
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4124d0
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [ebp - 0x5c]
call fcn.004297c1
mov eax, dword [ebp - 0x14]
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4124f4
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea esp, [ebp - 0x74]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00438dc7
mov esp, ebp
pop ebp
ret