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

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x47cdfd
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x50
mov eax, dword [0x4b4200]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
xorps xmm0, xmm0
mov dword [ebp - 0x18], 0
xor eax, eax
movq qword [ebp - 0x20], xmm0
mov dword [ebp - 0x20], 0
mov byte [ebp - 0x18], 0
test esi, esi
je 0x404b8d
cmp word [esi], ax
je 0x404b8d
inc eax
cmp word [esi + eax*2], 0
jne 0x404b85
mov dword [ebp - 0x1c], eax
mov ecx, 2
inc eax
mul ecx
mov ecx, 0xffffffff
cmovb eax, ecx
push eax
call fcn.0046a3df
mov edx, eax
add esp, 4
mov eax, dword [ebp - 0x1c]
xor ecx, ecx
mov dword [ebp - 0x20], edx
test eax, eax
jle 0x404bca
mov ax, word [esi + ecx*2]
mov word [edx + ecx*2], ax
inc ecx
mov eax, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x20]
cmp ecx, eax
jl 0x404bb7
xor ecx, ecx
mov word [edx + eax*2], cx
push 2
push 1
push 1
mov dword [ebp - 4], ecx
lea ecx, [ebp - 0x20]
push 1
push 0x49ed80
mov byte [ebp - 0x18], 1
call fcn.00406350
mov edi, 0x49eafc
test eax, eax
jne 0x404cef
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x20]
test eax, eax
jne 0x404c1b
xor eax, eax
test ecx, ecx
je 0x404c18
cmp word [ecx], ax
je 0x404c18
nop
inc eax
cmp word [ecx + eax*2], 0
jne 0x404c10
mov dword [ebp - 0x1c], eax
cmp eax, 2
jl 0x404cef
cmp word [ecx + 2], 0x3a
jne 0x404cef
mov byte [ebp - 0x18], 0
test eax, eax
jne 0x404c4b
cmp word [ecx], ax
je 0x404c48
nop dword [eax]
inc eax
cmp word [ecx + eax*2], 0
jne 0x404c40
mov dword [ebp - 0x1c], eax
xor ecx, ecx
nop dword [eax]
inc ecx
cmp word [ecx*2 + 0x49eafc], 0
jne 0x404c50
add eax, ecx
mov ecx, 2
mov dword [ebp - 0x58], eax
inc eax
mul ecx
mov ecx, 0xffffffff
cmovb eax, ecx
push eax
call fcn.0046a3df
mov edx, dword [ebp - 0x20]
add esp, 4
mov dword [ebp - 0x50], eax
mov ecx, eax
mov esi, 0x5c
sub edi, eax
nop dword [eax]
mov word [ecx], si
add ecx, 2
movzx eax, word [edi + ecx]
mov esi, eax
test ax, ax
jne 0x404c90
cmp dword [ebp - 0x20], 0
mov edi, 0x49eafc
je 0x404cca
movzx eax, word [edx]
mov esi, eax
test ax, ax
je 0x404cca
movzx eax, ax
lea edx, [edx + 2]
mov word [ecx], ax
add ecx, 2
movzx eax, word [edx]
test ax, ax
jne 0x404cb6
xor eax, eax
mov word [ecx], ax
mov eax, dword [ebp - 0x20]
test eax, eax
je 0x404cdf
push eax
call fcn.00469dd3
add esp, 4
mov eax, dword [ebp - 0x50]
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x58]
mov dword [ebp - 0x1c], eax
mov byte [ebp - 0x18], 1
push ecx
lea ecx, [ebp - 0x20]
call fcn.00406f30
mov esi, dword [eax + 4]
test esi, esi
jne 0x404d1b
mov ecx, dword [eax]
test ecx, ecx
je 0x404d18
cmp word [ecx], si
je 0x404d18
nop word [eax + eax]
inc esi
cmp word [ecx + esi*2], 0
jne 0x404d10
mov dword [eax + 4], esi
cmp esi, 3
jl 0x405397
push 4
push 1
push 1
push 1
push 0x49eafc
lea ecx, [ebp - 0x20]
call fcn.00406350
mov dword [ebp - 0x4c], eax
test eax, eax
je 0x404e1f
cmp esi, 6
jl 0x405397
jne 0x404e1f
mov eax, dword [ebp - 0x1c]
mov byte [ebp - 0x18], 0
test eax, eax
jne 0x404d7b
mov ecx, dword [ebp - 0x20]
test ecx, ecx
je 0x404d78
cmp word [ecx], ax
je 0x404d78
nop word [eax + eax]
inc eax
cmp word [ecx + eax*2], 0
jne 0x404d70
mov dword [ebp - 0x1c], eax
xor ecx, ecx
nop dword [eax]
inc ecx
cmp word [ecx*2 + 0x49eae8], 0
jne 0x404d80
add eax, ecx
mov ecx, 2
mov dword [ebp - 0x4c], eax
inc eax
mul ecx
mov ecx, 0xffffffff
cmovb eax, ecx
push eax
call fcn.0046a3df
mov edx, dword [ebp - 0x20]
add esp, 4
mov edi, eax
mov ecx, edi
test edx, edx
je 0x404dd4
movzx esi, word [edx]
test si, si
je 0x404dd4
mov eax, esi
nop
movzx eax, ax
lea edx, [edx + 2]
mov word [ecx], ax
add ecx, 2
movzx eax, word [edx]
test ax, ax
jne 0x404dc0
mov esi, 0x49eae8
mov edx, 0x5c
sub esi, ecx
mov word [ecx], dx
lea ecx, [ecx + 2]
movzx eax, word [esi + ecx]
mov edx, eax
test ax, ax
jne 0x404de0
xor eax, eax
mov word [ecx], ax
mov eax, dword [ebp - 0x20]
test eax, eax
je 0x404e06
push eax
call fcn.00469dd3
add esp, 4
mov eax, dword [ebp - 0x4c]
push edi
mov dword [ebp - 0x20], edi
mov dword [ebp - 0x1c], eax
mov byte [ebp - 0x18], 1
call dword [sym.imp.SHLWAPI.dll_PathIsRootW]
jmp 0x405399
mov eax, dword [ebp - 0x20]
test eax, eax
jne 0x404e3e
push 2
call fcn.0046a3df
add esp, 4
mov dword [ebp - 0x20], eax
xor ecx, ecx
mov word [eax], cx
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x1c], ecx
push eax
mov byte [ebp - 0x18], 1
call dword [sym.imp.SHLWAPI.dll_PathIsDirectoryW]
test eax, eax
je 0x404e54
mov al, 1
jmp 0x405399
mov eax, dword [ebp - 0x20]
test eax, eax
jne 0x404e73
push 2
call fcn.0046a3df
add esp, 4
mov dword [ebp - 0x20], eax
xor ecx, ecx
mov word [eax], cx
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x1c], ecx
push 0
push eax
mov byte [ebp - 0x18], 1
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x404e4d
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x404e4d
cmp dword [ebp - 0x4c], 0
mov eax, 0x49ed80
xorps xmm0, xmm0
mov dword [ebp - 0x24], 0
cmove edi, eax
movq qword [ebp - 0x2c], xmm0
xor esi, esi
cmp word [edi], si
je 0x404ebb
inc esi
cmp word [edi + esi*2], 0
jne 0x404eb3
mov ecx, 2
mov dword [ebp - 0x28], esi
lea eax, [esi + 1]
mul ecx
mov ecx, 0xffffffff
cmovb eax, ecx
push eax
call fcn.0046a3df
add esp, 4
mov dword [ebp - 0x2c], eax
test esi, esi
jle 0x404f03
mov ecx, eax
sub edi, eax
mov edx, esi
nop word [eax + eax]
mov ax, word [ecx + edi]
lea ecx, [ecx + 2]
mov word [ecx - 2], ax
sub edx, 1
jne 0x404ef0
mov eax, dword [ebp - 0x2c]
xor ecx, ecx
mov byte [ebp - 0x24], 1
mov word [eax + esi*2], cx
mov byte [ebp - 4], 1
xorps xmm0, xmm0
movq qword [ebp - 0x34], xmm0
movups xmmword [ebp - 0x44], xmm0
test esi, esi
jne 0x404f31
cmp word [eax], si
je 0x404f2e
inc esi
cmp word [eax + esi*2], 0
jne 0x404f26
mov dword [ebp - 0x28], esi
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x20]
test eax, eax
jne 0x404f51
xor eax, eax
test ecx, ecx
je 0x404f4e
cmp word [ecx], ax
je 0x404f4e
inc eax
cmp word [ecx + eax*2], 0
jne 0x404f46
mov dword [ebp - 0x1c], eax
cmp esi, eax
jl 0x404f59
mov esi, eax
jmp 0x404f60
xor edx, edx
test esi, esi
cmovs esi, edx
mov byte [ebp - 0x18], 1
test eax, eax
je 0x404fa2
sub eax, esi
xor edi, edi
mov dword [ebp - 0x1c], eax
test eax, eax
jle 0x404f99
add esi, esi
xor edx, edx
nop word [eax + eax]
mov ax, word [ecx + esi]
lea esi, [esi + 2]
mov word [ecx + edx], ax
lea edx, [edx + 2]
mov eax, dword [ebp - 0x1c]
inc edi
mov ecx, dword [ebp - 0x20]
cmp edi, eax
jl 0x404f80
xor edx, edx
mov word [ecx + eax*2], dx
mov ecx, dword [ebp - 0x20]
test ecx, ecx
jne 0x404fbe
push 2
call fcn.0046a3df
add esp, 4
mov dword [ebp - 0x20], eax
xor ecx, ecx
mov word [eax], cx
mov dword [ebp - 0x1c], ecx
mov ecx, dword [ebp - 0x20]
mov byte [ebp - 0x18], 1
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x44], 0
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x38], 0
mov byte [ebp - 0x30], 1
push 1
push 0x49eae8
push ecx
lea ecx, [ebp - 0x44]
mov byte [ebp - 4], 3
call fcn.00407700
mov byte [ebp - 4], 4
mov edi, dword [ebp - 0x44]
mov dword [ebp - 0x54], edi
cmp edi, 2
jb 0x40536c
test edi, edi
jne 0x405018
xor ecx, ecx
jmp 0x40502d
mov eax, 1
test edi, edi
cmove edi, eax
mov eax, dword [ebp - 0x3c]
mov dword [ebp - 0x54], edi
mov dword [ebp - 0x44], edi
mov ecx, dword [eax]
mov eax, dword [ebp - 0x20]
xor esi, esi
mov dword [ebp - 0x5c], eax
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x20], 0
mov byte [ebp - 0x18], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x50], ecx
mov byte [ebp - 0x24], 1
cmp word [eax], si
je 0x40505e
inc esi
cmp word [eax + esi*2], 0
jne 0x405056
test ecx, ecx
je 0x40507a
xor eax, eax
cmp word [ecx], ax
je 0x405078
nop dword [eax]
inc eax
cmp word [ecx + eax*2], 0
jne 0x405070
add esi, eax
mov ecx, 2
lea eax, [esi + 1]
mul ecx
mov ecx, 0xffffffff
cmovb eax, ecx
push eax
call fcn.0046a3df
mov edx, eax
add esp, 4
mov eax, dword [ebp - 0x20]
mov ecx, edx
mov dword [ebp - 0x58], edx
mov dword [ebp - 0x4c], eax
test eax, eax
je 0x4050c8
movzx eax, word [eax]
test ax, ax
je 0x4050c8
mov edi, dword [ebp - 0x4c]
movzx eax, ax
lea edi, [edi + 2]
mov word [ecx], ax
add ecx, 2
movzx eax, word [edi]
test ax, ax
jne 0x4050b1
mov edi, dword [ebp - 0x54]
mov eax, dword [ebp - 0x2c]
movzx eax, word [eax]
mov edx, eax
mov dword [ebp - 0x4c], edx
mov edx, dword [ebp - 0x58]
test ax, ax
je 0x4050fa
mov edi, dword [ebp - 0x2c]
movzx edx, ax
sub edi, ecx
mov word [ecx], dx
add ecx, 2
movzx eax, word [edi + ecx]
mov edx, eax
test ax, ax
jne 0x4050e3
mov edx, dword [ebp - 0x58]
mov edi, dword [ebp - 0x54]
mov eax, dword [ebp - 0x50]
test eax, eax
je 0x405137
movzx eax, word [eax]
mov edi, eax
mov dword [ebp - 0x4c], edi
mov edi, dword [ebp - 0x54]
test ax, ax
je 0x405137
mov edi, dword [ebp - 0x50]
movzx edx, ax
sub edi, ecx
nop dword [eax]
mov word [ecx], dx
add ecx, 2
movzx eax, word [ecx + edi]
mov edx, eax
test ax, ax
jne 0x405120
mov edx, dword [ebp - 0x58]
mov edi, dword [ebp - 0x54]
xor eax, eax
mov word [ecx], ax
mov eax, dword [ebp - 0x20]
test eax, eax
je 0x40514f
push eax
call fcn.00469dd3
mov edx, dword [ebp - 0x58]
add esp, 4
mov eax, dword [ebp - 0x5c]
mov dword [ebp - 0x20], edx
mov dword [ebp - 0x1c], esi
mov byte [ebp - 0x18], 1
test eax, eax
je 0x40516f
push eax
call fcn.00469dd3
mov esi, dword [ebp - 0x1c]
add esp, 4
mov edx, dword [ebp - 0x20]
mov eax, 1
mov dword [ebp - 0x50], eax
cmp edi, eax
jbe 0x40533d
nop
test edi, edi
jne 0x40518b
xor ecx, ecx
shl eax, 2
jmp 0x4051a1
cmp edi, eax
ja 0x405198
lea edi, [eax + 1]
mov dword [ebp - 0x54], edi
mov dword [ebp - 0x44], edi
mov ecx, dword [ebp - 0x3c]
shl eax, 2
mov ecx, dword [eax + ecx]
cmp word [ecx], 0
je 0x4052c9
test edi, edi
je 0x4051d2
cmp dword [ebp - 0x50], edi
jb 0x4051cc
lea ecx, [edi - 1]
cmp edi, ecx
ja 0x4051c4
lea eax, [ecx + 1]
mov dword [ebp - 0x54], eax
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x3c]
mov edi, dword [eax + ecx*4]
jmp 0x4051d2
mov ecx, dword [ebp - 0x3c]
mov edi, dword [ecx + eax]
mov byte [ebp - 0x18], 0
test esi, esi
jne 0x4051ee
test edx, edx
je 0x4051eb
cmp word [edx], si
je 0x4051eb
inc esi
cmp word [edx + esi*2], 0
jne 0x4051e3
mov dword [ebp - 0x1c], esi
xor eax, eax
lea eax, [eax + 1]
cmp word [eax*2 + 0x49eae8], 0
jne 0x4051f0
lea ecx, [esi + eax]
mov dword [ebp - 0x4c], ecx
test edi, edi
je 0x40521d
xor eax, eax
cmp word [edi], ax
je 0x405218
nop
inc eax
cmp word [edi + eax*2], 0
jne 0x405210
add ecx, eax
mov dword [ebp - 0x4c], ecx
lea eax, [ecx + 1]
mov ecx, 2
mul ecx
mov ecx, 0xffffffff
cmovb eax, ecx
push eax
call fcn.0046a3df
mov edx, dword [ebp - 0x20]
add esp, 4
mov dword [ebp - 0x58], eax
mov ecx, eax
test edx, edx
je 0x405264
movzx eax, word [edx]
test ax, ax
je 0x405264
nop dword [eax]
movzx eax, ax
lea edx, [edx + 2]
mov word [ecx], ax
add ecx, 2
movzx eax, word [edx]
test ax, ax
jne 0x405250
mov esi, 0x49eae8
mov edx, 0x5c
sub esi, ecx
mov word [ecx], dx
add ecx, 2
movzx eax, word [esi + ecx]
mov edx, eax
test ax, ax
jne 0x405270
test edi, edi
je 0x4052a4
movzx eax, word [edi]
mov edx, eax
test ax, ax
je 0x4052a4
nop
movzx eax, ax
lea edi, [edi + 2]
mov word [ecx], ax
add ecx, 2
movzx eax, word [edi]
test ax, ax
jne 0x405290
xor eax, eax
mov word [ecx], ax
mov eax, dword [ebp - 0x20]
test eax, eax
je 0x4052b9
push eax
call fcn.00469dd3
add esp, 4
mov edx, dword [ebp - 0x58]
mov eax, dword [ebp - 0x4c]
mov dword [ebp - 0x20], edx
mov dword [ebp - 0x1c], eax
mov byte [ebp - 0x18], 1
test edx, edx
jne 0x4052e5
push 2
call fcn.0046a3df
add esp, 4
mov dword [ebp - 0x20], eax
xor ecx, ecx
mov word [eax], cx
mov edx, dword [ebp - 0x20]
mov dword [ebp - 0x1c], ecx
push edx
mov byte [ebp - 0x18], 1
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x405324
mov eax, dword [ebp - 0x20]
test eax, eax
jne 0x405313
push 2
call fcn.0046a3df
add esp, 4
mov dword [ebp - 0x20], eax
xor ecx, ecx
mov word [eax], cx
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x1c], ecx
push 0
push eax
mov byte [ebp - 0x18], 1
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
je 0x40536c
mov eax, dword [ebp - 0x50]
mov edi, dword [ebp - 0x54]
inc eax
mov dword [ebp - 0x50], eax
cmp eax, edi
jae 0x40533d
mov esi, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x20]
jmp 0x405180
mov eax, dword [ebp - 0x38]
test eax, eax
je 0x40534d
push eax
call fcn.00469dd3
add esp, 4
mov eax, dword [ebp - 0x3c]
test eax, eax
je 0x40535d
push eax
call fcn.00469dd3
add esp, 4
push dword [ebp - 0x2c]
call fcn.00469dd3
add esp, 4
mov al, 1
jmp 0x405399
mov eax, dword [ebp - 0x38]
test eax, eax
je 0x40537c
push eax
call fcn.00469dd3
add esp, 4
mov eax, dword [ebp - 0x3c]
test eax, eax
je 0x40538c
push eax
call fcn.00469dd3
add esp, 4
push dword [ebp - 0x2c]
call fcn.00469dd3
add esp, 4
xor al, al
mov ecx, dword [ebp - 0x20]
mov byte [ebp - 0x45], al
test ecx, ecx
je 0x4053af
push ecx
call fcn.00469dd3
mov al, byte [ebp - 0x45]
add esp, 4
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00469dc5
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret