Function at 0x407340
Capabilities:
Check if file exists
Create directory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x509900
mov eax, dword fs:[0]
push eax
sub esp, 0x48
mov eax, dword [0x53307c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
cmp dword [eax + 0x10], 0
jne 0x40737b
xor al, al
jmp 0x4075e5
push eax
lea ecx, [ebp - 0x28]
call fcn.00405b70
mov dword [ebp - 4], 0
mov ecx, dword [ebp - 0x18]
lea edx, [ecx - 1]
cmp ecx, edx
jbe 0x407601
mov ebx, dword [ebp - 0x14]
lea eax, [ebp - 0x28]
mov esi, dword [ebp - 0x28]
cmp ebx, 8
cmovae eax, esi
cmp word [eax + edx*2], 0x5c
je 0x407413
cmp ecx, edx
jbe 0x407606
cmp ebx, 8
lea eax, [ebp - 0x28]
cmovae eax, esi
cmp word [eax + edx*2], 0x2f
je 0x407413
mov eax, ebx
sub eax, ecx
cmp eax, 1
jb 0x4073fb
cmp ebx, 8
lea esi, [ebp - 0x28]
push 2
cmovae esi, dword [ebp - 0x28]
lea edi, [ecx + 1]
push 0x522d98
mov dword [ebp - 0x18], edi
lea eax, [esi + ecx*2]
push eax
call fcn.004e6f70
add esp, 0xc
xor eax, eax
mov word [esi + edi*2], ax
jmp 0x407413
push 1
push 0x522d98
mov byte [ebp - 0x54], 0
lea ecx, [ebp - 0x28]
push dword [ebp - 0x54]
push 1
call fcn.00408280
lea ecx, [ebp - 0x28]
call fcn.00406e20
test al, al
jne 0x407427
mov byte [ebp - 0x41], al
jmp 0x4075aa
cmp dword [ebp - 0x18], 0
je 0x40744a
cmp dword [ebp - 0x14], 8
lea eax, [ebp - 0x28]
cmovae eax, dword [ebp - 0x28]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40744a
mov bl, 1
jmp 0x4075ad
mov dword [ebp - 0x50], 0
mov dword [ebp - 0x4c], 0
mov dword [ebp - 0x48], 0
lea edx, [ebp - 0x50]
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x28]
call fcn.00406fc0
mov ebx, dword [ebp - 0x50]
mov eax, dword [ebp - 0x4c]
cmp ebx, eax
jne 0x407481
mov byte [ebp - 0x41], 0
jmp 0x407559
mov byte [ebp - 0x41], 1
mov esi, ebx
cmp dword [esi + 0x14], 8
mov edx, esi
jb 0x407491
mov edx, dword [esi]
mov ecx, edx
mov dword [ebp - 0x30], 0
xor eax, eax
mov dword [ebp - 0x2c], 7
mov word [ebp - 0x40], ax
lea edi, [ecx + 2]
nop word [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4074b0
sub ecx, edi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x40]
call fcn.00405140
cmp dword [ebp - 0x30], 0
jne 0x4074d3
mov bl, 1
jmp 0x4074ea
cmp dword [ebp - 0x2c], 8
lea eax, [ebp - 0x40]
cmovae eax, dword [ebp - 0x40]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
sete bl
mov edx, dword [ebp - 0x2c]
cmp edx, 8
jb 0x407524
mov ecx, dword [ebp - 0x40]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40751a
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40760b
push edx
push ecx
call fcn.0049e956
add esp, 8
test bl, bl
je 0x40753f
cmp dword [esi + 0x14], 8
mov eax, esi
jb 0x407532
mov eax, dword [esi]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
je 0x40754f
mov eax, dword [ebp - 0x4c]
add esi, 0x18
cmp esi, eax
jne 0x407487
jmp 0x407556
mov eax, dword [ebp - 0x4c]
mov byte [ebp - 0x41], 0
mov ebx, dword [ebp - 0x50]
test ebx, ebx
je 0x4075aa
push ecx
mov edx, eax
mov ecx, ebx
call fcn.00406950
mov ecx, dword [ebp - 0x48]
mov eax, 0x2aaaaaab
sub ecx, ebx
add esp, 4
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
lea ecx, [eax + eax*2]
mov eax, ebx
shl ecx, 3
cmp ecx, 0x1000
jb 0x4075a0
mov ebx, dword [ebx - 4]
add ecx, 0x23
sub eax, ebx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40760b
push ecx
push ebx
call fcn.0049e956
add esp, 8
mov bl, byte [ebp - 0x41]
mov edx, dword [ebp - 0x14]
cmp edx, 8
jb 0x4075e3
mov ecx, dword [ebp - 0x28]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4075d9
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x407610
push edx
push ecx
call fcn.0049e956
add esp, 8
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0049e964
mov esp, ebp
pop ebp
ret
call fcn.00405400
call fcn.00405400
call fcn.004e9a8c
call fcn.004e9a8c
int3