Function at 0x413f50
Capabilities:
Check if file exists
Create directory
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x42c804
mov eax, dword fs:[0]
push eax
sub esp, 0x684
mov eax, dword [0x436a98]
xor eax, ebp
mov dword [ebp - 0x10], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x66c], ecx
mov dword [ebp - 0x668], 0
mov eax, dword [ebp - 0x66c]
add eax, 0x2c
push eax
push 0x3ed
mov ecx, dword [ebp - 0x66c]
add ecx, 4
call fcn.00415640
mov ecx, dword [ebp - 0x66c]
add ecx, 0x2c
call fcn.00409720
movzx ecx, al
test ecx, ecx
je 0x413fc2
jmp 0x414580
mov ecx, dword [ebp - 0x66c]
add ecx, 0x2c
call fcn.00418500
push eax
lea ecx, [ebp - 0x428]
call fcn.0040afd0
mov dword [ebp - 4], 0
push 0x3f8
lea edx, [ebp - 0x658]
push edx
mov ecx, dword [ebp - 0x66c]
add ecx, 4
call fcn.00403ed0
mov ecx, eax
call fcn.00418500
push eax
lea ecx, [ebp - 0x654]
call fcn.004155a0
mov ecx, eax
call fcn.00415550
test eax, eax
jne 0x4140c8
push str.http:__
push 7
lea eax, [ebp - 0x65c]
push eax
lea ecx, [ebp - 0x428]
call fcn.004158b0
mov dword [ebp - 0x670], eax
mov ecx, dword [ebp - 0x670]
mov dword [ebp - 0x674], ecx
mov byte [ebp - 4], 1
mov edx, dword [ebp - 0x668]
or edx, 1
mov dword [ebp - 0x668], edx
mov ecx, dword [ebp - 0x674]
call fcn.0040b0e0
test eax, eax
je 0x4140bc
push str.ftp:__
push 6
lea eax, [ebp - 0x660]
push eax
lea ecx, [ebp - 0x428]
call fcn.004158b0
mov dword [ebp - 0x678], eax
mov ecx, dword [ebp - 0x678]
mov dword [ebp - 0x67c], ecx
mov dword [ebp - 4], 2
mov edx, dword [ebp - 0x668]
or edx, 2
mov dword [ebp - 0x668], edx
mov ecx, dword [ebp - 0x67c]
call fcn.0040b0e0
test eax, eax
jne 0x4140c8
mov dword [ebp - 0x680], 0
jmp 0x4140d2
mov dword [ebp - 0x680], 1
mov al, byte [ebp - 0x680]
mov byte [ebp - 0x64d], al
mov dword [ebp - 4], 1
mov ecx, dword [ebp - 0x668]
and ecx, 2
je 0x414102
and dword [ebp - 0x668], 0xfffffffd
lea ecx, [ebp - 0x660]
call fcn.00404a50
mov dword [ebp - 4], 0
mov edx, dword [ebp - 0x668]
and edx, 1
je 0x414126
and dword [ebp - 0x668], 0xfffffffe
lea ecx, [ebp - 0x65c]
call fcn.00404a50
movzx eax, byte [ebp - 0x64d]
test eax, eax
je 0x41423f
mov ecx, dword [ebp - 0x66c]
add ecx, 0x2c
call fcn.00418500
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x41423f
lea ecx, [ebp - 0x430]
call fcn.0040a4b0
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x434]
call fcn.0040a4b0
mov byte [ebp - 4], 4
mov ecx, dword [ebp - 0x66c]
add ecx, 0x24
call fcn.00418500
mov dword [ebp - 0x684], eax
lea ecx, [ebp - 0x430]
call fcn.00404f50
push eax
push 0xba
mov ecx, dword [ebp - 0x684]
push ecx
mov edx, dword [ebp - 0x684]
mov eax, dword [edx]
mov ecx, dword [eax + 0x14]
call ecx
mov ecx, dword [ebp - 0x66c]
add ecx, 0x24
call fcn.00418500
mov dword [ebp - 0x688], eax
lea ecx, [ebp - 0x434]
call fcn.00404f50
push eax
push 0xbb
mov edx, dword [ebp - 0x688]
push edx
mov eax, dword [ebp - 0x688]
mov ecx, dword [eax]
mov edx, dword [ecx + 0x14]
call edx
push 0
lea ecx, [ebp - 0x430]
call fcn.00418500
push eax
lea ecx, [ebp - 0x434]
call fcn.00418500
push eax
mov ecx, dword [ebp - 0x66c]
add ecx, 4
call fcn.00403f00
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x434]
call fcn.00403df0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x430]
call fcn.00403df0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x428]
call fcn.00404a50
jmp 0x414580
push 0x401
mov ecx, dword [ebp - 0x66c]
add ecx, 4
call fcn.00403eb0
test eax, eax
je 0x414273
mov eax, dword [ebp - 0x66c]
add eax, 0x2c
push eax
mov ecx, dword [ebp - 0x66c]
add ecx, 0x30
call fcn.004155c0
jmp 0x414463
push 0x3f0
lea ecx, [ebp - 0x664]
push ecx
mov ecx, dword [ebp - 0x66c]
add ecx, 4
call fcn.00403ed0
mov ecx, eax
call fcn.00418500
push eax
lea ecx, [ebp - 0x640]
call fcn.004154b0
xor edx, edx
mov word [ebp - 0x63c], dx
push 0x206
push 0
lea eax, [ebp - 0x63a]
push eax
call fcn.0041c220
add esp, 0xc
lea ecx, [ebp - 0x63c]
push ecx
lea ecx, [ebp - 0x640]
call fcn.00415430
push eax
lea ecx, [ebp - 0x640]
call fcn.00415480
lea edx, [ebp - 0x63c]
push edx
mov ecx, dword [ebp - 0x66c]
add ecx, 0x30
call fcn.00409630
mov ecx, dword [ebp - 0x66c]
add ecx, 0x30
call fcn.00409690
cmp eax, 3
jbe 0x414463
mov ecx, dword [ebp - 0x66c]
add ecx, 0x30
call fcn.00418500
add eax, 6
push eax
lea ecx, [ebp - 0x644]
call fcn.0040afd0
mov byte [ebp - 4], 5
push str._:____
lea ecx, [ebp - 0x644]
call fcn.00415970
cmp eax, 0xffffffff
jne 0x414358
push 0x42e5b8
lea ecx, [ebp - 0x644]
call fcn.004159c0
cmp eax, 0xffffffff
je 0x414454
lea ecx, [ebp - 0x64c]
call fcn.0040a4b0
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x648]
call fcn.0040a4b0
mov byte [ebp - 4], 7
mov ecx, dword [ebp - 0x66c]
add ecx, 0x24
call fcn.00418500
mov dword [ebp - 0x68c], eax
lea ecx, [ebp - 0x64c]
call fcn.00404f50
push eax
push 0xb5
mov eax, dword [ebp - 0x68c]
push eax
mov ecx, dword [ebp - 0x68c]
mov edx, dword [ecx]
mov eax, dword [edx + 0x14]
call eax
mov ecx, dword [ebp - 0x66c]
add ecx, 0x24
call fcn.00418500
mov dword [ebp - 0x690], eax
lea ecx, [ebp - 0x648]
call fcn.00404f50
push eax
push 0xb6
mov ecx, dword [ebp - 0x690]
push ecx
mov edx, dword [ebp - 0x690]
mov eax, dword [edx]
mov ecx, dword [eax + 0x14]
call ecx
push 0
lea ecx, [ebp - 0x64c]
call fcn.00418500
push eax
lea ecx, [ebp - 0x648]
call fcn.00418500
push eax
mov ecx, dword [ebp - 0x66c]
add ecx, 4
call fcn.00403f00
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x648]
call fcn.00403df0
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x64c]
call fcn.00403df0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x644]
call fcn.00404a50
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x428]
call fcn.00404a50
jmp 0x414580
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x644]
call fcn.00404a50
xor edx, edx
mov word [ebp - 0x21c], dx
push 0x206
push 0
lea eax, [ebp - 0x21a]
push eax
call fcn.0041c220
add esp, 0xc
push 0x104
lea ecx, [ebp - 0x21c]
push ecx
push 0x42e5c0
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
push 0
lea edx, [ebp - 0x21c]
push edx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
xor eax, eax
mov word [ebp - 0x424], ax
push 0x206
push 0
lea ecx, [ebp - 0x422]
push ecx
call fcn.0041c220
add esp, 0xc
lea edx, [ebp - 0x21c]
push edx
push 0x104
lea eax, [ebp - 0x424]
push eax
call fcn.0041bdae
add esp, 0xc
push 0x42e5e4
lea ecx, [ebp - 0x424]
push ecx
call fcn.00403be0
add esp, 8
lea ecx, [ebp - 0x42c]
call fcn.00403fe0
mov byte [ebp - 4], 8
push 0x3fb
mov ecx, dword [ebp - 0x66c]
add ecx, 4
call fcn.00403eb0
push eax
push 0x42e600
lea edx, [ebp - 0x42c]
push edx
call fcn.00404000
add esp, 0xc
lea eax, [ebp - 0x424]
push eax
lea ecx, [ebp - 0x42c]
call fcn.00418500
push eax
push 0x42e608
push 0x42e61c
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
mov ecx, dword [ebp + 0xc]
push ecx
mov ecx, dword [ebp - 0x66c]
call fcn.004036b0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x42c]
call fcn.00404a50
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x428]
call fcn.00404a50
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0041c203
mov esp, ebp
pop ebp
ret 0xc