Function at 0x41696b
Capabilities:
Check if file exists
Create directory
Get common file path

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x228
mov eax, dword [0x4242b4]
push ebx
push esi
mov esi, ecx
mov dword [ebp - 4], eax
push edi
lea eax, [esi + 0x690]
push eax
lea eax, [esi + 0x17c]
push eax
xor ebx, ebx
xor edi, edi
lea eax, [ebp - 0x108]
inc ebx
push eax
mov dword [ebp - 0x220], ebx
mov dword [esi + 0x28], edi
mov dword [esi + 0x2c], edi
mov dword [esi], ebx
mov dword [esi + 0x30], edi
call fcn.0040c2ca
test eax, eax
jne 0x4169c9
push 0x408590
call fcn.0040be00
pop ecx
push 0xfffffffffffffff7
jmp 0x416c92
cmp dword [esi + 0xab8], edi
jne 0x416ab6
push edi
lea eax, [ebp - 0x108]
push eax
call fcn.0040c335
test eax, eax
jne 0x416a6b
cmp dword [esi + 0x24], edi
jne 0x416a04
push dword [ebp - 0x220]
mov ecx, esi
call fcn.0041518c
cmp eax, edi
jl 0x416edd
mov eax, dword [esi + 0x75fc]
cmp eax, edi
je 0x416a29
lea ecx, [ebp - 0x220]
push ecx
push 0x413156
push edi
lea ecx, [ebp - 0x108]
push ecx
call dword [eax + 0x20]
cmp eax, edi
jne 0x416a7b
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
mov dword [ebp - 0x210], eax
je 0x416a7b
cmp eax, 3
je 0x416a7b
cmp eax, 0xcb
je 0x416a7b
push eax
push 0x408558
call fcn.0040be00
xor eax, eax
cmp dword [ebp - 0x210], 0x70
pop ecx
setne al
pop ecx
dec eax
and eax, 3
add eax, 0xfffffff7
jmp 0x416edd
lea eax, [ebp - 0x108]
push eax
mov ecx, esi
call fcn.00414bb0
jmp 0x4169fc
push dword [ebp - 0x220]
mov ecx, esi
call fcn.00414f15
cmp eax, edi
mov dword [esi + 0x178], eax
jl 0x416edd
mov eax, dword [esi + 0xac4]
cmp eax, 3
je 0x416aa6
cmp eax, 2
jne 0x416ab6
mov dword [esi + 0x3c], ebx
mov dword [esi + 0x40], ebx
mov dword [esi + 0x44], 2
mov dword [esi + 0x48], edi
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcpynA]
push 0x104
lea eax, [esi + 0x280]
push eax
lea eax, [ebp - 0x108]
push eax
call ebx
lea eax, [ebp - 0x108]
push eax
mov ecx, esi
call fcn.0040efe5
cmp eax, edi
mov dword [ebp - 0x210], eax
je 0x416d60
push dword [esi + 0x24]
mov ecx, esi
push eax
call fcn.0041a0c6
mov ecx, eax
mov eax, edx
xor edx, edx
cmp dword [esi + 0xc], edi
mov dword [ebp - 0x214], eax
setne dl
inc edx
imul edx, edx, 0x4e2000
mov eax, edx
cdq
add ecx, eax
mov eax, dword [ebp - 0x214]
adc eax, edx
mov dword [esi + 0x2c], eax
lea eax, [ebp - 0x108]
mov dword [esi + 0x28], ecx
push eax
mov ecx, esi
call fcn.0040f088
mov dword [ebp - 0x21c], eax
or eax, edx
mov dword [ebp - 0x218], edx
je 0x416dc0
push dword [esi + 0x24]
mov ecx, esi
push dword [ebp - 0x210]
call fcn.0041a2f2
add eax, dword [esi + 0x28]
mov edi, edx
adc edi, dword [esi + 0x2c]
mov dword [ebp - 0x228], eax
cmp dword [ebp - 0x218], edi
jg 0x416be6
jl 0x416b76
cmp dword [ebp - 0x21c], eax
jae 0x416be6
movsx eax, byte [esi + 0x74]
mov ebx, dword [sym.imp.USER32.dll_CharLowerA]
movzx eax, ax
push eax
call ebx
movsx ecx, byte [ebp - 0x108]
movzx ecx, cx
push ecx
mov dword [ebp - 0x214], eax
call ebx
mov ecx, dword [ebp - 0x214]
cmp ecx, eax
jne 0x416bbb
push dword [esi + 0x24]
mov ecx, esi
push dword [ebp - 0x210]
call fcn.0041a0c6
add dword [ebp - 0x228], eax
adc edi, edx
push dword [esi + 0x2c]
push dword [esi + 0x28]
push edi
push dword [ebp - 0x228]
push dword [ebp - 0x218]
push dword [ebp - 0x21c]
push 0x408518
call fcn.0040be00
add esp, 0x1c
jmp 0x416c90
lea eax, [esi + 0x74]
push 0x104
push eax
mov dword [ebp - 0x224], eax
lea eax, [ebp - 0x20c]
push eax
call ebx
lea eax, [ebp - 0x20c]
push eax
mov ecx, esi
call fcn.0040efe5
mov edi, eax
test edi, edi
mov dword [ebp - 0x210], edi
je 0x416d60
lea eax, [ebp - 0x20c]
push eax
mov ecx, esi
call fcn.0040f088
mov ecx, eax
or ecx, edx
mov dword [ebp - 0x21c], eax
mov dword [ebp - 0x218], edx
je 0x416dc0
cmp dword [esi + 0x24], 0
je 0x416c98
xor ecx, ecx
cmp dword [esi + 0xc], ecx
setne cl
inc ecx
imul ecx, ecx, 0x4e2000
add ecx, dword [esi + 0xac0]
mov edi, ecx
xor ecx, ecx
cmp edx, ecx
jg 0x416edb
jl 0x416c71
cmp eax, edi
jae 0x416edb
push dword [esi + 0x2c]
push dword [esi + 0x28]
push ecx
push edi
push edx
push eax
movsx eax, byte [ebp - 0x20c]
push eax
push 0x4084c0
call fcn.0040be00
add esp, 0x20
push 0xfffffffffffffffa
pop eax
jmp 0x416edd
movsx eax, byte [ebp - 0x20c]
mov ebx, dword [sym.imp.USER32.dll_CharLowerA]
movzx eax, ax
push eax
call ebx
movsx ecx, byte [ebp - 0x108]
movzx ecx, cx
push ecx
mov dword [ebp - 0x214], eax
call ebx
mov ecx, dword [ebp - 0x214]
push dword [esi + 0x24]
cmp ecx, eax
push edi
mov ecx, esi
jne 0x416cf8
call fcn.0041a0c6
push 0
push 2
push edx
push eax
call fcn.0041a970
push dword [esi + 0x24]
mov ecx, esi
push dword [ebp - 0x210]
mov ebx, eax
mov edi, edx
call fcn.0041a2f2
add ebx, eax
adc edi, edx
jmp 0x416d01
call fcn.0041a0c6
mov ebx, eax
mov edi, edx
xor eax, eax
cmp dword [esi + 0xc], eax
setne al
inc eax
imul eax, eax, 0x4e2000
cdq
add ebx, eax
adc edi, edx
cmp dword [ebp - 0x218], edi
jg 0x416edb
jl 0x416d2f
cmp dword [ebp - 0x21c], ebx
jae 0x416edb
push 0x104
lea eax, [esi + 0x280]
push eax
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
lea eax, [ebp - 0x108]
push eax
mov ecx, esi
call fcn.0040efe5
test eax, eax
mov dword [ebp - 0x210], eax
jne 0x416d6a
push 0x408484
jmp 0x4169bc
push dword [esi + 0x24]
mov ecx, esi
push eax
call fcn.0041a0c6
push 0
push 2
push edx
push eax
call fcn.0041a970
push dword [esi + 0x24]
mov ecx, esi
push dword [ebp - 0x210]
mov edi, eax
mov ebx, edx
call fcn.0041a2f2
add edi, eax
adc ebx, edx
xor eax, eax
cmp dword [esi + 0xc], eax
mov ecx, esi
setne al
inc eax
imul eax, eax, 0x4e2000
cdq
add edi, eax
lea eax, [ebp - 0x108]
push eax
adc ebx, edx
call fcn.0040f088
mov ecx, eax
or ecx, edx
jne 0x416dca
push 0x408448
jmp 0x4169bc
cmp edx, ebx
jg 0x416de0
jl 0x416dd4
cmp eax, edi
jae 0x416de0
push dword [esi + 0x2c]
push dword [esi + 0x28]
push ebx
jmp 0x416c78
push dword [esi + 0x24]
mov esi, dword [ebp - 0x224]
push esi
call fcn.0040cabe
test eax, eax
jne 0x416e21
push esi
call fcn.0040c4a4
push esi
push 0x408438
call fcn.0040cc94
test eax, eax
je 0x416e16
push esi
push 0x408414
call fcn.0040be00
pop ecx
jmp 0x416e20
push 0x4083d8
call fcn.0040be00
pop ecx
push 3
lea eax, [ebp - 0x108]
push eax
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
push esi
xor edi, edi
push edi
push 0x4045d4
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
test eax, eax
jne 0x416e5f
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x408398
jmp 0x416ea2
push edi
push esi
call fcn.0040cabe
test eax, eax
jne 0x416e75
push 0x408360
call fcn.0040be00
pop ecx
push edi
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
jne 0x416ead
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x70
jne 0x416e9c
push 0x401f70
call fcn.0040be00
pop ecx
jmp 0x416c90
push eax
push 0x408330
call fcn.0040be00
pop ecx
jmp 0x4169c1
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
inc eax
inc eax
cmp eax, 0x104
jle 0x416ec7
push 0x4082fc
jmp 0x4169bc
push 0x401354
push esi
call dword [sym.imp.KERNEL32.dll_lstrcatA]
push esi
call fcn.0040cdef
jmp 0x416edd
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
pop ebx
call fcn.0041a84f
leave
ret