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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x569f98
mov eax, dword fs:[0]
push eax
sub esp, 0x24c
mov eax, dword [0x5a6124]
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 edi, dword [ebp + 8]
lea ecx, [ebp - 0x258]
mov eax, dword [ebp + 0xc]
push 0
push edi
mov dword [ebp - 0x23c], eax
call fcn.004db2f0
push ecx
mov ecx, esp
mov dword [ebp - 4], 0
push 0x56e744
call fcn.00407b50
lea ecx, [ebp - 0x258]
call fcn.004dcd60
or ebx, 0xffffffff
test eax, eax
je 0x4e690d
push ecx
mov ecx, esp
push 0x56e744
call fcn.00407b50
lea eax, [ebp - 0x22c]
push eax
lea ecx, [ebp - 0x258]
call fcn.004dd070
push eax
mov ecx, 0x5a9744
mov byte [ebp - 4], 1
call fcn.00403080
mov edx, dword [ebp - 0x22c]
mov eax, ebx
mov byte [ebp - 4], 0
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4e690d
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push 0x208
lea eax, [ebp - 0x218]
push 0
push eax
call fcn.00506b00
add esp, 0xc
lea eax, [ebp - 0x218]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
push eax
lea ecx, [ebp - 0x224]
call fcn.00407b50
mov eax, dword [ebp - 0x224]
mov byte [ebp - 4], 2
cmp dword [eax - 4], 1
jle 0x4e6974
push dword [eax - 0xc]
lea ecx, [ebp - 0x224]
call fcn.00407590
mov eax, dword [ebp - 0x224]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveExtensionW]
mov eax, dword [ebp - 0x224]
push dword [eax - 8]
push eax
call fcn.0052340e
mov edx, eax
add esp, 8
test edx, edx
js 0x4e7095
mov ecx, dword [ebp - 0x224]
cmp edx, dword [ecx - 8]
jg 0x4e7095
mov dword [ecx - 0xc], edx
xor ecx, ecx
mov eax, dword [ebp - 0x224]
mov word [eax + edx*2], cx
mov eax, dword [ebp - 0x224]
cmp dword [eax - 0xc], ecx
jl 0x4e69ed
push 0x56dd48
push eax
call fcn.00506c5a
add esp, 8
test eax, eax
je 0x4e69ed
sub eax, dword [ebp - 0x224]
sar eax, 1
js 0x4e69ed
push 3
push 0x56e750
mov ecx, 0x5a9744
call fcn.00407990
mov dword [ebp - 0x22c], 0
mov dword [ebp - 0x238], 0
mov dword [ebp - 0x234], 0
mov dword [ebp - 0x230], 0
push 0x58388c
lea ecx, [ebp - 0x220]
mov byte [ebp - 4], 3
call fcn.00407b50
lea eax, [ebp - 0x238]
mov byte [ebp - 4], 4
push eax
lea eax, [ebp - 0x220]
push eax
lea eax, [ebp - 0x224]
push eax
call fcn.00486ea0
mov edx, dword [ebp - 0x220]
add esp, 0xc
mov byte [ebp - 4], 3
add edx, 0xfffffff0
mov eax, ebx
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4e6a6b
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [0x5a9744]
mov ecx, dword [ebp - 0x238]
cmp dword [eax - 0xc], 0
jne 0x4e6aa0
mov eax, dword [ebp - 0x234]
sub eax, ecx
sar eax, 2
cmp eax, 3
jb 0x4e6aa0
lea eax, [ecx + 8]
mov ecx, 0x5a9744
push eax
call fcn.00403080
mov ecx, dword [ebp - 0x238]
mov eax, dword [ebp - 0x234]
sub eax, ecx
sar eax, 2
cmp eax, 4
jb 0x4e6b25
mov eax, dword [ecx + 0xc]
sub eax, 0x10
push eax
call fcn.00407010
add esp, 4
cmp dword [eax + 4], 0
lea esi, [eax + 0x10]
jl 0x4e6b0e
push str.SMDB
push esi
call fcn.00506c5a
add esp, 8
test eax, eax
je 0x4e6ae3
sub eax, esi
sar eax, 1
cmp eax, 0xffffffff
jne 0x4e6b04
cmp dword [esi - 0xc], 0
jl 0x4e6b0e
push 0x58617c
push esi
call fcn.00506c5a
add esp, 8
test eax, eax
je 0x4e6b0e
sub eax, esi
sar eax, 1
cmp eax, 0xffffffff
je 0x4e6b0e
mov dword [ebp - 0x22c], 1
add esi, 0xfffffff0
mov eax, ebx
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x4e6b25
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
push edi
lea ecx, [ebp - 0x21c]
call fcn.00407b50
mov eax, dword [ebp - 0x21c]
mov byte [ebp - 4], 5
cmp dword [eax - 0xc], 0
jl 0x4e6b99
push 0x56e758
push eax
call fcn.00506c5a
mov ecx, eax
add esp, 8
mov eax, dword [ebp - 0x21c]
test ecx, ecx
je 0x4e6b64
sub ecx, eax
sar ecx, 1
cmp ecx, 0xffffffff
jne 0x4e6b8d
cmp dword [eax - 0xc], 0
jl 0x4e6b99
push 0x56e760
push eax
call fcn.00506c5a
mov ecx, eax
add esp, 8
mov eax, dword [ebp - 0x21c]
test ecx, ecx
je 0x4e6b99
sub ecx, eax
sar ecx, 1
cmp ecx, 0xffffffff
je 0x4e6b99
mov dword [0x5a9740], 1
jmp 0x4e6ba3
mov dword [0x5a9740], 0
cmp dword [eax - 0xc], 0
jl 0x4e6e7d
push 0x56e768
push eax
call fcn.00506c5a
mov ecx, eax
add esp, 8
mov eax, dword [ebp - 0x21c]
test ecx, ecx
je 0x4e6bd0
sub ecx, eax
sar ecx, 1
cmp ecx, 0xffffffff
jne 0x4e6c05
cmp dword [eax - 0xc], 0
jl 0x4e6e7d
push 0x56e770
push eax
call fcn.00506c5a
mov ecx, eax
add esp, 8
mov eax, dword [ebp - 0x21c]
test ecx, ecx
je 0x4e6e27
sub ecx, eax
sar ecx, 1
cmp ecx, 0xffffffff
je 0x4e6e27
push ecx
mov ecx, esp
push 0x56e770
call fcn.00407b50
lea eax, [ebp - 0x220]
push eax
lea ecx, [ebp - 0x258]
call fcn.004dd070
mov eax, dword [ebp - 0x220]
mov byte [ebp - 4], 6
cmp dword [eax - 0xc], 0
jne 0x4e6c84
push ecx
mov ecx, esp
push 0x56e768
call fcn.00407b50
lea eax, [ebp - 0x228]
push eax
lea ecx, [ebp - 0x258]
call fcn.004dd070
push eax
lea ecx, [ebp - 0x220]
mov byte [ebp - 4], 7
call fcn.00403080
mov edx, dword [ebp - 0x228]
mov eax, ebx
mov byte [ebp - 4], 6
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4e6c84
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push dword [ebp - 0x220]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x4e6d92
xor ebx, ebx
nop word [eax + eax]
mov eax, dword [ebp - 0x220]
test ebx, ebx
js 0x4e6d86
cmp ebx, dword [eax - 0xc]
jg 0x4e6cd9
lea eax, [eax + ebx*2]
push 0x584208
push eax
call fcn.00506c5a
mov edi, eax
add esp, 8
mov eax, dword [ebp - 0x220]
test edi, edi
je 0x4e6cd9
sub edi, eax
sar edi, 1
cmp edi, 0xffffffff
jne 0x4e6d10
test ebx, ebx
js 0x4e6d86
cmp ebx, dword [eax - 0xc]
jg 0x4e6d86
lea eax, [eax + ebx*2]
push 0x588aa8
push eax
call fcn.00506c5a
mov edi, eax
add esp, 8
test edi, edi
je 0x4e6d80
mov eax, dword [ebp - 0x220]
sub edi, eax
sar edi, 1
cmp edi, 0xffffffff
je 0x4e6d86
push edi
lea eax, [ebp - 0x228]
push eax
lea ecx, [ebp - 0x220]
call fcn.0041ea80
mov esi, dword [ebp - 0x228]
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x4e6d3c
push eax
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov eax, dword [ebp - 0x220]
inc edi
add esi, 0xfffffff0
mov ebx, edi
cmp edi, dword [eax - 0xc]
jge 0x4e6d6b
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x4e6ca0
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x4e6ca0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x4e6d80
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x220]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
or ebx, 0xffffffff
push ecx
mov esi, esp
mov dword [ebp - 0x228], esp
mov dword [ebp - 0x240], esi
mov eax, dword [ebp - 0x220]
add eax, 0xfffffff0
push eax
call fcn.00407010
add eax, 0x10
add esp, 4
mov dword [esi], eax
mov eax, dword [0x5a96b8]
mov byte [ebp - 4], 8
test eax, eax
jne 0x4e6df4
push 0x174
call fcn.00502524
add esp, 4
mov dword [ebp - 0x240], eax
mov byte [ebp - 4], 9
test eax, eax
je 0x4e6de9
mov ecx, eax
call fcn.0044d080
jmp 0x4e6deb
xor eax, eax
mov byte [ebp - 4], 8
mov dword [0x5a96b8], eax
lea ecx, [eax + 4]
mov byte [ebp - 4], 6
call fcn.00454d60
mov edx, dword [ebp - 0x220]
mov eax, ebx
mov byte [ebp - 4], 5
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4e6e21
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x21c]
cmp dword [eax - 0xc], 0
jl 0x4e6e7d
push 0x56e778
push eax
call fcn.00506c5a
mov ecx, eax
add esp, 8
mov eax, dword [ebp - 0x21c]
test ecx, ecx
je 0x4e6e54
sub ecx, eax
sar ecx, 1
cmp ecx, 0xffffffff
jne 0x4e6ee6
cmp dword [eax - 0xc], 0
jl 0x4e6e7d
push 0x56e780
push eax
call fcn.00506c5a
mov ecx, eax
add esp, 8
mov eax, dword [ebp - 0x21c]
test ecx, ecx
je 0x4e6e7d
sub ecx, eax
sar ecx, 1
cmp ecx, 0xffffffff
jne 0x4e6ee6
cmp dword [ebp - 0x22c], 0
jne 0x4e6ee6
cmp dword [0x5a9740], 0
mov dword [0x5a973c], 0
jne 0x4e6ea8
push 0
call fcn.00472680
add esp, 4
mov dword [0x5a9740], eax
push 0x57f940
push 0x56e2f0
push 0x56e2fc
push 0
call fcn.00481040
add esp, 0x10
call fcn.004df020
call fcn.004e5090
call fcn.004e1d60
mov ecx, dword [ebp - 0x23c]
call fcn.004e70a0
mov dword [ebp - 0x22c], eax
jmp 0x4e6f70
mov dword [0x5a973c], 1
cmp dword [eax - 0xc], 0
jl 0x4e6f45
push 0x56e788
push eax
call fcn.00506c5a
mov ecx, eax
add esp, 8
mov eax, dword [ebp - 0x21c]
test ecx, ecx
je 0x4e6f19
sub ecx, eax
sar ecx, 1
cmp ecx, 0xffffffff
jne 0x4e6f3e
cmp dword [eax - 0xc], 0
jl 0x4e6f45
push 0x56e790
push eax
call fcn.00506c5a
add esp, 8
test eax, eax
je 0x4e6f45
sub eax, dword [ebp - 0x21c]
sar eax, 1
cmp eax, 0xffffffff
je 0x4e6f45
mov esi, 1
jmp 0x4e6f47
xor esi, esi
push 0x57f940
push 0x56e2f0
push 0x56e2fc
push 0
call fcn.00481040
push esi
call fcn.004e52c0
add esp, 0x14
mov dword [ebp - 0x22c], 0
mov edx, dword [ebp - 0x21c]
mov eax, ebx
mov byte [ebp - 4], 3
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4e6f91
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov esi, dword [ebp - 0x238]
mov byte [ebp - 4], 2
test esi, esi
je 0x4e700c
mov edi, dword [ebp - 0x234]
cmp esi, edi
je 0x4e6fd6
nop dword [eax]
mov edx, dword [esi]
mov eax, ebx
sub edx, 0x10
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4e6fc9
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
add esi, 4
cmp esi, edi
jne 0x4e6fb0
mov esi, dword [ebp - 0x238]
mov eax, dword [ebp - 0x230]
lea ecx, [ebp - 0x238]
sub eax, esi
sar eax, 2
push eax
push esi
call fcn.00450840
mov dword [ebp - 0x238], 0
mov dword [ebp - 0x234], 0
mov dword [ebp - 0x230], 0
mov edx, dword [ebp - 0x224]
mov eax, ebx
mov byte [ebp - 4], 0
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4e702d
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x254]
mov dword [ebp - 4], 0xffffffff
test eax, eax
je 0x4e7058
push dword [ebp - 0x250]
push eax
call fcn.004de7c0
push dword [ebp - 0x254]
call fcn.00511536
add esp, 0xc
mov edx, dword [ebp - 0x258]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], ebx
dec ebx
test ebx, ebx
jg 0x4e7073
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x22c]
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.00502bf3
mov esp, ebp
pop ebp
ret
push 0x80070057
call fcn.00407c80
int3