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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4d7e76
mov eax, dword fs:[0]
push eax
sub esp, 0x258
mov eax, dword [0x50d108]
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 - 0x264]
mov eax, dword [ebp + 0xc]
push 0
push edi
mov dword [ebp - 0x244], edi
mov dword [ebp - 0x24c], eax
call fcn.0047c8c0
push ecx
mov ecx, esp
mov dword [ebp - 4], 0
push 0x4db5e0
call fcn.004043c0
lea ecx, [ebp - 0x264]
call fcn.0047d440
or ebx, 0xffffffff
test eax, eax
je 0x4852e3
push ecx
mov ecx, esp
push 0x4db5e0
call fcn.004043c0
lea eax, [ebp - 0x230]
push eax
lea ecx, [ebp - 0x264]
call fcn.0047d4d0
push eax
mov ecx, 0x5114d0
mov byte [ebp - 4], 1
call fcn.00402130
mov edx, dword [ebp - 0x230]
mov eax, ebx
mov byte [ebp - 4], 0
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4852e3
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.004a33a0
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 - 0x22c]
call fcn.004043c0
mov eax, dword [ebp - 0x22c]
mov byte [ebp - 4], 2
cmp dword [eax - 4], 1
jle 0x48534a
push dword [eax - 0xc]
lea ecx, [ebp - 0x22c]
call fcn.004040f0
mov eax, dword [ebp - 0x22c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveExtensionW]
mov eax, dword [ebp - 0x22c]
push dword [eax - 8]
push eax
call fcn.004acb1c
mov edx, eax
add esp, 8
test edx, edx
js 0x4856dd
mov ecx, dword [ebp - 0x22c]
cmp edx, dword [ecx - 8]
jg 0x4856dd
mov dword [ecx - 0xc], edx
xor ecx, ecx
mov eax, dword [ebp - 0x22c]
mov dword [ebp - 0x230], ecx
mov word [eax + edx*2], cx
mov dword [ebp - 0x240], ecx
mov dword [ebp - 0x23c], ecx
mov dword [ebp - 0x238], ecx
push 0x4ef448
lea ecx, [ebp - 0x234]
mov byte [ebp - 4], 3
call fcn.004043c0
lea eax, [ebp - 0x240]
mov byte [ebp - 4], 4
push eax
lea eax, [ebp - 0x234]
push eax
lea eax, [ebp - 0x22c]
push eax
call fcn.00463cb0
mov edx, dword [ebp - 0x234]
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 0x4853f9
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [0x5114d0]
cmp dword [eax - 0xc], 0
jne 0x4855ed
mov ecx, dword [ebp - 0x23c]
mov edx, dword [ebp - 0x240]
sub ecx, edx
sar ecx, 2
cmp ecx, 3
jb 0x4855e9
mov eax, dword [edx + 8]
sub eax, 0x10
push eax
call fcn.00404550
add esp, 4
lea esi, [eax + 0x10]
mov dword [ebp - 0x234], esi
mov byte [ebp - 4], 5
call fcn.00404900
mov ecx, eax
test ecx, ecx
jne 0x485453
push 0x80004005
call fcn.00404660
mov eax, dword [ecx]
call dword [eax + 0xc]
mov dword [ebp - 0x228], eax
lea ecx, [eax + 0x10]
mov dword [ebp - 0x248], ecx
cmp dword [esi - 0xc], 0
mov byte [ebp - 4], 6
jl 0x485810
push 0x4ef320
push esi
call fcn.004a34fa
add esp, 8
test eax, eax
je 0x4856e7
sub eax, esi
sar eax, 1
jne 0x4856e7
cmp dword [esi - 0xc], 0x14
jl 0x4856e7
lea eax, [esi - 0x10]
push eax
call fcn.00404550
add esp, 4
lea edi, [eax + 0x10]
mov dword [ebp - 0x21c], edi
cmp dword [esi - 0xc], 0x14
mov byte [ebp - 4], 7
jle 0x4854f9
push 0x14
push 0
lea eax, [ebp - 0x224]
push eax
lea ecx, [ebp - 0x234]
call fcn.004177f0
push eax
lea ecx, [ebp - 0x21c]
mov byte [ebp - 4], 8
call fcn.00402130
lea ecx, [ebp - 0x224]
mov byte [ebp - 4], 7
call fcn.00401e90
mov edi, dword [ebp - 0x21c]
push 4
push 0
lea eax, [ebp - 0x224]
push eax
lea ecx, [ebp - 0x21c]
call fcn.004177f0
push eax
mov ecx, 0x5114d0
mov byte [ebp - 4], 9
call fcn.00402130
mov edx, dword [ebp - 0x224]
mov eax, ebx
mov byte [ebp - 4], 7
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x48553f
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [edi - 0xc]
lea ecx, [ebp - 0x21c]
add eax, 0xfffffffc
push eax
push 4
lea eax, [ebp - 0x224]
push eax
call fcn.004177f0
push eax
mov ecx, 0x511514
mov byte [ebp - 4], 0xa
call fcn.00402130
mov byte [ebp - 4], 7
mov edx, dword [ebp - 0x224]
mov eax, ebx
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x48558a
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 6
add edi, 0xfffffff0
mov eax, ebx
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x4855a5
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
mov edi, dword [ebp - 0x244]
mov edx, dword [ebp - 0x228]
mov eax, ebx
mov byte [ebp - 4], 5
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4855c9
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 3
add esi, 0xfffffff0
mov eax, ebx
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x4855e4
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [0x5114d0]
cmp dword [eax - 0xc], 0
jle 0x4855f8
push eax
call fcn.00463480
add esp, 4
mov eax, dword [ebp - 0x23c]
mov edx, dword [ebp - 0x240]
sub eax, edx
sar eax, 2
cmp eax, 4
jb 0x4856bc
mov eax, dword [edx + 0xc]
sub eax, 0x10
push eax
call fcn.00404550
add esp, 4
cmp dword [eax + 4], 0
lea esi, [eax + 0x10]
jl 0x4856a5
push str.SMDB
push esi
call fcn.004a34fa
add esp, 8
test eax, eax
je 0x485645
sub eax, esi
sar eax, 1
cmp eax, 0xffffffff
jne 0x485666
cmp dword [esi - 0xc], 0
jl 0x4856a5
push 0x4f2504
push esi
call fcn.004a34fa
add esp, 8
test eax, eax
je 0x485670
sub eax, esi
sar eax, 1
cmp eax, 0xffffffff
je 0x485670
mov dword [ebp - 0x230], 1
cmp dword [esi - 0xc], 0
jl 0x4856a5
push 0x4db5ec
push esi
call fcn.004a34fa
add esp, 8
test eax, eax
je 0x485691
sub eax, esi
sar eax, 1
cmp eax, 0xffffffff
jne 0x4856a5
cmp dword [esi - 0xc], 0
jl 0x4856a5
push 0x4db5f0
push esi
call fcn.004a34fa
add esp, 8
add esi, 0xfffffff0
mov eax, ebx
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x4856bc
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
push edi
lea ecx, [ebp - 0x220]
call fcn.004043c0
mov eax, dword [ebp - 0x220]
mov byte [ebp - 4], 0xf
mov esi, dword [eax - 0xc]
test esi, esi
jns 0x485826
push 0x80070057
call fcn.00404660
cmp dword [esi - 0xc], 0
jl 0x485810
push 0x4ef328
push esi
call fcn.004a34fa
add esp, 8
test eax, eax
je 0x485709
sub eax, esi
sar eax, 1
je 0x485733
cmp dword [esi - 0xc], 0
jl 0x485810
push 0x4ef330
push esi
call fcn.004a34fa
add esp, 8
test eax, eax
je 0x485810
sub eax, esi
sar eax, 1
jne 0x485810
cmp dword [esi - 0xc], 0x18
jl 0x485810
lea eax, [esi - 0x10]
push eax
call fcn.00404550
add esp, 4
lea edi, [eax + 0x10]
mov dword [ebp - 0x21c], edi
cmp dword [esi - 0xc], 0x18
mov byte [ebp - 4], 0xb
jle 0x485797
push 0x18
push 0
lea eax, [ebp - 0x224]
push eax
lea ecx, [ebp - 0x234]
call fcn.004177f0
push eax
lea ecx, [ebp - 0x21c]
mov byte [ebp - 4], 0xc
call fcn.00402130
lea ecx, [ebp - 0x224]
mov byte [ebp - 4], 0xb
call fcn.00401e90
mov edi, dword [ebp - 0x21c]
push 4
push 0
lea eax, [ebp - 0x224]
push eax
lea ecx, [ebp - 0x21c]
call fcn.004177f0
push eax
mov ecx, 0x5114d0
mov byte [ebp - 4], 0xd
call fcn.00402130
mov edx, dword [ebp - 0x224]
mov eax, ebx
mov byte [ebp - 4], 0xb
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4857dd
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [edi - 0xc]
lea ecx, [ebp - 0x21c]
add eax, 0xfffffffc
push eax
push 4
lea eax, [ebp - 0x224]
push eax
call fcn.004177f0
push eax
mov ecx, 0x511514
mov byte [ebp - 4], 0xe
call fcn.00402130
mov byte [ebp - 4], 0xb
jmp 0x48556d
lea eax, [ebp - 0x234]
mov ecx, 0x5114d0
push eax
call fcn.00402130
jmp 0x4855ab
mov ecx, dword [eax - 8]
mov edx, 1
sub edx, dword [eax - 4]
sub ecx, esi
or ecx, edx
jge 0x485849
push esi
lea ecx, [ebp - 0x220]
call fcn.004041b0
mov eax, dword [ebp - 0x220]
lea ecx, [esi + 1]
push ecx
push eax
call fcn.004ace5c
mov eax, dword [ebp - 0x220]
add esp, 8
cmp esi, dword [eax - 8]
jg 0x4856dd
mov dword [eax - 0xc], esi
xor ecx, ecx
mov eax, dword [ebp - 0x220]
mov word [eax + esi*2], cx
mov eax, dword [ebp - 0x220]
cmp dword [eax - 0xc], ecx
jge 0x485884
or edx, 0xffffffff
jmp 0x4858a7
push 0x4db5f4
push eax
call fcn.004a34fa
mov edx, eax
add esp, 8
mov eax, dword [ebp - 0x220]
test edx, edx
jne 0x4858a3
or edx, 0xffffffff
jmp 0x4858a7
sub edx, eax
sar edx, 1
xor ecx, ecx
cmp edx, 0xffffffff
setne cl
mov dword [0x5114c8], ecx
cmp dword [eax - 0xc], 0
jge 0x4858c0
or edx, 0xffffffff
jmp 0x4858e3
push str._ndl
push eax
call fcn.004a34fa
mov edx, eax
add esp, 8
mov eax, dword [ebp - 0x220]
test edx, edx
jne 0x4858df
or edx, 0xffffffff
jmp 0x4858e3
sub edx, eax
sar edx, 1
xor ecx, ecx
cmp edx, 0xffffffff
setne cl
mov dword [0x5114cc], ecx
cmp dword [eax - 0xc], 0
jl 0x485ba0
push 0x4db608
push eax
call fcn.004a34fa
mov ecx, eax
add esp, 8
mov eax, dword [ebp - 0x220]
test ecx, ecx
je 0x48591e
sub ecx, eax
sar ecx, 1
cmp ecx, 0xffffffff
jne 0x485953
cmp dword [eax - 0xc], 0
jl 0x485ba0
push 0x4db610
push eax
call fcn.004a34fa
mov ecx, eax
add esp, 8
mov eax, dword [ebp - 0x220]
test ecx, ecx
je 0x485b77
sub ecx, eax
sar ecx, 1
cmp ecx, 0xffffffff
je 0x485b77
push ecx
mov ecx, esp
push 0x4db610
call fcn.004043c0
lea eax, [ebp - 0x21c]
push eax
lea ecx, [ebp - 0x264]
call fcn.0047d4d0
mov eax, dword [ebp - 0x21c]
mov byte [ebp - 4], 0x10
cmp dword [eax - 0xc], 0
jne 0x4859d2
push ecx
mov ecx, esp
push 0x4db608
call fcn.004043c0
lea eax, [ebp - 0x228]
push eax
lea ecx, [ebp - 0x264]
call fcn.0047d4d0
push eax
lea ecx, [ebp - 0x21c]
mov byte [ebp - 4], 0x11
call fcn.00402130
mov edx, dword [ebp - 0x228]
mov eax, ebx
mov byte [ebp - 4], 0x10
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4859d2
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push dword [ebp - 0x21c]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x485ae2
xor ebx, ebx
nop dword [eax + eax]
mov eax, dword [ebp - 0x21c]
test ebx, ebx
js 0x485ad6
cmp ebx, dword [eax - 0xc]
jg 0x485a29
lea eax, [eax + ebx*2]
push 0x4eed18
push eax
call fcn.004a34fa
mov edi, eax
add esp, 8
mov eax, dword [ebp - 0x21c]
test edi, edi
je 0x485a29
sub edi, eax
sar edi, 1
cmp edi, 0xffffffff
jne 0x485a60
test ebx, ebx
js 0x485ad6
cmp ebx, dword [eax - 0xc]
jg 0x485ad6
lea eax, [eax + ebx*2]
push 0x4f2920
push eax
call fcn.004a34fa
mov edi, eax
add esp, 8
test edi, edi
je 0x485ad0
mov eax, dword [ebp - 0x21c]
sub edi, eax
sar edi, 1
cmp edi, 0xffffffff
je 0x485ad6
push edi
lea eax, [ebp - 0x228]
push eax
lea ecx, [ebp - 0x21c]
call fcn.00417780
mov esi, dword [ebp - 0x228]
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x485a8c
push eax
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov eax, dword [ebp - 0x21c]
inc edi
add esi, 0xfffffff0
mov ebx, edi
cmp edi, dword [eax - 0xc]
jge 0x485abb
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x4859f0
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x4859f0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x485ad0
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x21c]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
or ebx, 0xffffffff
push ecx
mov esi, esp
mov dword [ebp - 0x248], esp
mov dword [ebp - 0x228], esi
mov eax, dword [ebp - 0x21c]
add eax, 0xfffffff0
push eax
call fcn.00404550
add eax, 0x10
add esp, 4
mov dword [esi], eax
mov eax, dword [0x51140c]
mov byte [ebp - 4], 0x12
test eax, eax
jne 0x485b44
push 0x18c
call fcn.0048a2e5
add esp, 4
mov dword [ebp - 0x228], eax
mov byte [ebp - 4], 0x13
test eax, eax
je 0x485b39
mov ecx, eax
call fcn.0042df60
jmp 0x485b3b
xor eax, eax
mov byte [ebp - 4], 0x12
mov dword [0x51140c], eax
lea ecx, [eax + 4]
mov byte [ebp - 4], 0x10
call fcn.00434cf0
mov edx, dword [ebp - 0x21c]
mov eax, ebx
mov byte [ebp - 4], 0xf
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x485b71
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x220]
cmp dword [eax - 0xc], 0
jl 0x485ba0
push 0x4db618
push eax
call fcn.004a34fa
mov ecx, eax
add esp, 8
mov eax, dword [ebp - 0x220]
test ecx, ecx
je 0x485ba0
sub ecx, eax
sar ecx, 1
cmp ecx, 0xffffffff
jne 0x485c02
cmp dword [ebp - 0x230], 0
jne 0x485c02
xor eax, eax
mov dword [0x5114c4], eax
cmp dword [0x5114c8], eax
jne 0x485bc7
call fcn.00455db0
mov dword [0x5114c8], eax
mov eax, dword [0x5114c4]
push dword [0x5114c8]
push eax
push str.silent_dupdate_d
push 0x4db41c
push 0x4db40c
call fcn.00463230
add esp, 0x14
call fcn.00483a70
call fcn.00480270
mov ecx, dword [ebp - 0x24c]
call fcn.00485da0
mov dword [ebp - 0x230], eax
jmp 0x485c74
mov dword [0x5114c4], 1
cmp dword [eax - 0xc], 0
jge 0x485c17
or eax, 0xffffffff
jmp 0x485c36
push 0x4db620
push eax
call fcn.004a34fa
add esp, 8
test eax, eax
jne 0x485c2e
or eax, 0xffffffff
jmp 0x485c36
sub eax, dword [ebp - 0x220]
sar eax, 1
push dword [0x5114c8]
xor ebx, ebx
cmp eax, 0xffffffff
push dword [0x5114c4]
setne bl
push str.silent_dupdate_d
push 0x4db41c
push 0x4db40c
call fcn.00463300
push ebx
call fcn.00483ca0
add esp, 0x18
mov dword [ebp - 0x230], 0
or ebx, 0xffffffff
mov edx, dword [ebp - 0x220]
mov eax, ebx
mov byte [ebp - 4], 3
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x485c95
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov esi, dword [ebp - 0x240]
mov byte [ebp - 4], 2
test esi, esi
je 0x485d0c
mov edi, dword [ebp - 0x23c]
cmp esi, edi
je 0x485cd6
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 0x485cc9
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
add esi, 4
cmp esi, edi
jne 0x485cb0
mov esi, dword [ebp - 0x240]
mov eax, dword [ebp - 0x238]
lea ecx, [ebp - 0x240]
sub eax, esi
sar eax, 2
push eax
push esi
call fcn.0042a9b0
mov dword [ebp - 0x240], 0
mov dword [ebp - 0x23c], 0
mov dword [ebp - 0x238], 0
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 0x485d2d
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x260]
mov dword [ebp - 4], 0xffffffff
test eax, eax
je 0x485d58
push dword [ebp - 0x25c]
push eax
call fcn.0047d800
push dword [ebp - 0x260]
call fcn.004a644d
add esp, 0xc
mov edx, dword [ebp - 0x264]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], ebx
dec ebx
test ebx, ebx
jg 0x485d73
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x230]
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.0048a7e3
mov esp, ebp
pop ebp
ret