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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4cf2a8
mov eax, dword fs:[0]
push eax
sub esp, 0x24c
mov eax, dword [0x501108]
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 ebx, dword [ebp + 8]
lea ecx, [ebp - 0x258]
mov eax, dword [ebp + 0xc]
push 0
push ebx
mov dword [ebp - 0x23c], eax
call fcn.00476540
push ecx
mov ecx, esp
mov dword [ebp - 4], 0
push 0x4d258c
call fcn.00404260
lea ecx, [ebp - 0x258]
call fcn.004770c0
or edi, 0xffffffff
test eax, eax
je 0x47ee7d
push ecx
mov ecx, esp
push 0x4d258c
call fcn.00404260
lea eax, [ebp - 0x22c]
push eax
lea ecx, [ebp - 0x258]
call fcn.00477150
push eax
mov ecx, 0x505288
mov byte [ebp - 4], 1
call fcn.00401fe0
mov edx, dword [ebp - 0x22c]
mov eax, edi
mov byte [ebp - 4], 0
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x47ee7d
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.0049bdc0
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.00404260
mov eax, dword [ebp - 0x224]
mov byte [ebp - 4], 2
cmp dword [eax - 4], 1
jle 0x47eee4
push dword [eax - 0xc]
lea ecx, [ebp - 0x224]
call fcn.00403f90
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.004a553c
mov edx, eax
add esp, 8
test edx, edx
js 0x47f0bd
mov ecx, dword [ebp - 0x224]
cmp edx, dword [ecx - 8]
jg 0x47f0bd
mov dword [ecx - 0xc], edx
xor ecx, ecx
mov eax, dword [ebp - 0x224]
mov dword [ebp - 0x22c], ecx
mov word [eax + edx*2], cx
mov dword [ebp - 0x238], ecx
mov dword [ebp - 0x234], ecx
mov dword [ebp - 0x230], ecx
push 0x4e6098
lea ecx, [ebp - 0x220]
mov byte [ebp - 4], 3
call fcn.00404260
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.0045fea0
mov edx, dword [ebp - 0x220]
add esp, 0xc
mov byte [ebp - 4], 3
add edx, 0xfffffff0
mov eax, edi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x47ef93
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [0x505288]
mov edx, dword [ebp - 0x238]
cmp dword [eax - 0xc], 0
jne 0x47efd1
mov ecx, dword [ebp - 0x234]
sub ecx, edx
sar ecx, 2
cmp ecx, 3
jb 0x47efcd
lea eax, [edx + 8]
mov ecx, 0x505288
push eax
call fcn.00401fe0
mov edx, dword [ebp - 0x238]
mov eax, dword [0x505288]
cmp dword [eax - 0xc], 0
jle 0x47efe2
push eax
call fcn.0045f670
mov edx, dword [ebp - 0x238]
add esp, 4
mov eax, dword [ebp - 0x234]
sub eax, edx
sar eax, 2
cmp eax, 4
jb 0x47f0a0
mov eax, dword [edx + 0xc]
sub eax, 0x10
push eax
call fcn.004043f0
add esp, 4
cmp dword [eax + 4], 0
lea esi, [eax + 0x10]
jl 0x47f089
push str.SMDB
push esi
call fcn.0049bf1a
add esp, 8
test eax, eax
je 0x47f029
sub eax, esi
sar eax, 1
cmp eax, 0xffffffff
jne 0x47f04a
cmp dword [esi - 0xc], 0
jl 0x47f089
push 0x4ec62c
push esi
call fcn.0049bf1a
add esp, 8
test eax, eax
je 0x47f054
sub eax, esi
sar eax, 1
cmp eax, 0xffffffff
je 0x47f054
mov dword [ebp - 0x22c], 1
cmp dword [esi - 0xc], 0
jl 0x47f089
push 0x4d2598
push esi
call fcn.0049bf1a
add esp, 8
test eax, eax
je 0x47f075
sub eax, esi
sar eax, 1
cmp eax, 0xffffffff
jne 0x47f089
cmp dword [esi - 0xc], 0
jl 0x47f089
push 0x4d259c
push esi
call fcn.0049bf1a
add esp, 8
add esi, 0xfffffff0
mov eax, edi
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x47f0a0
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
push ebx
lea ecx, [ebp - 0x21c]
call fcn.00404260
mov eax, dword [ebp - 0x21c]
mov byte [ebp - 4], 5
mov esi, dword [eax - 0xc]
test esi, esi
jns 0x47f0c7
push 0x80070057
call fcn.00404500
mov ecx, dword [eax - 8]
mov edx, 1
sub edx, dword [eax - 4]
sub ecx, esi
or ecx, edx
jge 0x47f0ea
push esi
lea ecx, [ebp - 0x21c]
call fcn.00404050
mov eax, dword [ebp - 0x21c]
lea ecx, [esi + 1]
push ecx
push eax
call fcn.004a587c
mov eax, dword [ebp - 0x21c]
add esp, 8
cmp esi, dword [eax - 8]
jg 0x47f0bd
mov dword [eax - 0xc], esi
xor ecx, ecx
mov eax, dword [ebp - 0x21c]
mov word [eax + esi*2], cx
mov eax, dword [ebp - 0x21c]
cmp dword [eax - 0xc], ecx
jge 0x47f121
or edx, 0xffffffff
jmp 0x47f144
push 0x4d25a0
push eax
call fcn.0049bf1a
mov edx, eax
add esp, 8
mov eax, dword [ebp - 0x21c]
test edx, edx
jne 0x47f140
or edx, 0xffffffff
jmp 0x47f144
sub edx, eax
sar edx, 1
xor ecx, ecx
cmp edx, 0xffffffff
setne cl
mov dword [0x505280], ecx
cmp dword [eax - 0xc], 0
jge 0x47f15d
or edx, 0xffffffff
jmp 0x47f180
push str._ndl
push eax
call fcn.0049bf1a
mov edx, eax
add esp, 8
mov eax, dword [ebp - 0x21c]
test edx, edx
jne 0x47f17c
or edx, 0xffffffff
jmp 0x47f180
sub edx, eax
sar edx, 1
xor ecx, ecx
cmp edx, 0xffffffff
setne cl
mov dword [0x505284], ecx
cmp dword [eax - 0xc], 0
jl 0x47f440
push 0x4d25b4
push eax
call fcn.0049bf1a
mov ecx, eax
add esp, 8
mov eax, dword [ebp - 0x21c]
test ecx, ecx
je 0x47f1bb
sub ecx, eax
sar ecx, 1
cmp ecx, 0xffffffff
jne 0x47f1f0
cmp dword [eax - 0xc], 0
jl 0x47f440
push 0x4d25bc
push eax
call fcn.0049bf1a
mov ecx, eax
add esp, 8
mov eax, dword [ebp - 0x21c]
test ecx, ecx
je 0x47f417
sub ecx, eax
sar ecx, 1
cmp ecx, 0xffffffff
je 0x47f417
push ecx
mov ecx, esp
push 0x4d25bc
call fcn.00404260
lea eax, [ebp - 0x220]
push eax
lea ecx, [ebp - 0x258]
call fcn.00477150
mov eax, dword [ebp - 0x220]
mov byte [ebp - 4], 6
cmp dword [eax - 0xc], 0
jne 0x47f26f
push ecx
mov ecx, esp
push 0x4d25b4
call fcn.00404260
lea eax, [ebp - 0x228]
push eax
lea ecx, [ebp - 0x258]
call fcn.00477150
push eax
lea ecx, [ebp - 0x220]
mov byte [ebp - 4], 7
call fcn.00401fe0
mov edx, dword [ebp - 0x228]
mov eax, edi
mov byte [ebp - 4], 6
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x47f26f
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 0x47f382
xor ebx, ebx
nop word [eax + eax]
mov eax, dword [ebp - 0x220]
test ebx, ebx
js 0x47f376
cmp ebx, dword [eax - 0xc]
jg 0x47f2c9
lea eax, [eax + ebx*2]
push 0x4e5b54
push eax
call fcn.0049bf1a
mov edi, eax
add esp, 8
mov eax, dword [ebp - 0x220]
test edi, edi
je 0x47f2c9
sub edi, eax
sar edi, 1
cmp edi, 0xffffffff
jne 0x47f300
test ebx, ebx
js 0x47f376
cmp ebx, dword [eax - 0xc]
jg 0x47f376
lea eax, [eax + ebx*2]
push 0x4ec98c
push eax
call fcn.0049bf1a
mov edi, eax
add esp, 8
test edi, edi
je 0x47f370
mov eax, dword [ebp - 0x220]
sub edi, eax
sar edi, 1
cmp edi, 0xffffffff
je 0x47f376
push edi
lea eax, [ebp - 0x228]
push eax
lea ecx, [ebp - 0x220]
call fcn.00417490
mov esi, dword [ebp - 0x228]
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x47f32c
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 0x47f35b
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x47f290
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x47f290
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x47f370
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 edi, 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.004043f0
add eax, 0x10
add esp, 4
mov dword [esi], eax
mov eax, dword [0x5051cc]
mov byte [ebp - 4], 8
test eax, eax
jne 0x47f3e4
push 0x188
call fcn.00482f1a
add esp, 4
mov dword [ebp - 0x240], eax
mov byte [ebp - 4], 9
test eax, eax
je 0x47f3d9
mov ecx, eax
call fcn.0042d300
jmp 0x47f3db
xor eax, eax
mov byte [ebp - 4], 8
mov dword [0x5051cc], eax
lea ecx, [eax + 4]
mov byte [ebp - 4], 6
call fcn.00433090
mov edx, dword [ebp - 0x220]
mov eax, edi
mov byte [ebp - 4], 5
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x47f411
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 0x47f440
push 0x4d25c4
push eax
call fcn.0049bf1a
mov ecx, eax
add esp, 8
mov eax, dword [ebp - 0x21c]
test ecx, ecx
je 0x47f440
sub ecx, eax
sar ecx, 1
cmp ecx, 0xffffffff
jne 0x47f4a2
cmp dword [ebp - 0x22c], 0
jne 0x47f4a2
xor eax, eax
mov dword [0x50527c], eax
cmp dword [0x505280], eax
jne 0x47f467
call fcn.00454890
mov dword [0x505280], eax
mov eax, dword [0x50527c]
push dword [0x505280]
push eax
push str.silent_dupdate_d
push 0x4d22e8
push 0x4d2304
call fcn.0045f4d0
add esp, 0x14
call fcn.0047d630
call fcn.00479e40
mov ecx, dword [ebp - 0x23c]
call fcn.0047f640
mov dword [ebp - 0x22c], eax
jmp 0x47f511
mov dword [0x50527c], 1
cmp dword [eax - 0xc], 0
jge 0x47f4b7
or eax, 0xffffffff
jmp 0x47f4d6
push 0x4d25cc
push eax
call fcn.0049bf1a
add esp, 8
test eax, eax
jne 0x47f4ce
or eax, 0xffffffff
jmp 0x47f4d6
sub eax, dword [ebp - 0x21c]
sar eax, 1
push dword [0x505280]
xor ebx, ebx
cmp eax, 0xffffffff
push dword [0x50527c]
setne bl
push str.silent_dupdate_d
push 0x4d22e8
push 0x4d2304
call fcn.0045f5a0
push ebx
call fcn.0047d860
add esp, 0x18
mov dword [ebp - 0x22c], 0
mov edx, dword [ebp - 0x21c]
mov eax, edi
mov byte [ebp - 4], 3
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x47f532
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 0x47f5ac
mov ebx, dword [ebp - 0x234]
cmp esi, ebx
je 0x47f576
nop word [eax + eax]
mov edx, dword [esi]
mov eax, edi
sub edx, 0x10
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x47f569
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
add esi, 4
cmp esi, ebx
jne 0x47f550
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.00429d70
mov dword [ebp - 0x238], 0
mov dword [ebp - 0x234], 0
mov dword [ebp - 0x230], 0
mov edx, dword [ebp - 0x224]
mov eax, edi
mov byte [ebp - 4], 0
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x47f5cd
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 0x47f5f8
push dword [ebp - 0x250]
push eax
call fcn.00477480
push dword [ebp - 0x254]
call fcn.0049ee6d
add esp, 0xc
mov edx, dword [ebp - 0x258]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], edi
dec edi
test edi, edi
jg 0x47f613
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.00483426
mov esp, ebp
pop ebp
ret