Function at 0x426832
Capabilities:
Check if file exists
Create directory
Get common file path
Get file attributes
Get file size

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xc34
mov eax, dword [0x4424f4]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, ecx
xor ebx, ebx
mov dword [ebp - 0xc28], ebx
mov dword [ebp - 0xc24], ebx
mov eax, dword [edi + 0x84]
test eax, eax
je 0x426c17
mov dword [edi + 0x80], ebx
mov eax, dword [eax + 0x54]
test eax, eax
jne 0x426879
mov eax, ebx
jmp 0x42687f
mov eax, dword [eax + 0x268]
mov dword [edi + 0x80], eax
test eax, eax
je 0x426c17
push ebx
push ebx
push 0x800
lea eax, [ebp - 0xc20]
push eax
push 0xffffffffffffffff
push dword [edi + 8]
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
je 0x426c11
lea eax, [ebp - 0xc20]
push 0x5c
push eax
call dword [sym.imp.msvcrt.dll_strrchr]
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x4268eb
lea eax, [ebp - 0xc20]
push 0x2f
push eax
call dword [sym.imp.msvcrt.dll_strrchr]
mov esi, eax
pop ecx
pop ecx
test esi, esi
je 0x426c11
add esi, 1
je 0x426c11
lea eax, [ebp - 0x420]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
test eax, eax
je 0x426c11
call dword [sym.imp.KERNEL32.dll_GetTickCount]
xor edx, edx
mov ecx, 0x186a0
div ecx
mov eax, edx
push eax
mov dword [ebp - 0xc2c], eax
lea eax, [ebp - 0x420]
push eax
push 0x405f9c
lea eax, [ebp - 0x110]
push 0x104
push eax
call fcn.0041db0e
add esp, 0x14
test eax, eax
js 0x426c11
push 0x104
lea eax, [ebp - 0x318]
push eax
push 0xffffffffffffffff
lea eax, [ebp - 0x110]
push eax
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
je 0x426c11
lea ebx, [edi + 0x28]
mov dword [edi + 0x50], 1
test ebx, ebx
je 0x4269f2
cmp dword [ebx], 0
je 0x426989
push dword [ebx]
call fcn.00440db7
xor eax, eax
pop ecx
mov dword [ebx], eax
lea ecx, [ebp - 0x318]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, word [ebp - 0xc28]
jne 0x426992
sub ecx, edx
sar ecx, 1
push 2
pop edx
lea eax, [ecx + 1]
xor ecx, ecx
mov dword [ebp - 0xc30], eax
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00440dea
mov dword [ebx], eax
pop ecx
test eax, eax
je 0x4269f2
mov edx, dword [ebp - 0xc30]
lea ecx, [ebp - 0x318]
push ecx
mov ecx, eax
call fcn.0040c040
test eax, eax
jns 0x4269f2
cmp dword [ebx], 0
je 0x4269f2
push dword [ebx]
call fcn.00440db7
xor eax, eax
pop ecx
mov dword [ebx], eax
push esi
push dword [ebp - 0xc2c]
lea eax, [ebp - 0x420]
mov ebx, 0x104
push eax
push 0x405fac
lea eax, [ebp - 0x110]
push ebx
push eax
call fcn.0041db0e
add esp, 0x18
test eax, eax
js 0x426c09
push ebx
lea eax, [ebp - 0x318]
xor ebx, ebx
push eax
push 0xffffffffffffffff
lea eax, [ebp - 0x110]
push eax
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
je 0x426c11
push ebx
lea eax, [ebp - 0x318]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
je 0x426c11
lea esi, [edi + 0x1c]
inc ebx
test esi, esi
je 0x426add
cmp dword [esi], 0
je 0x426a74
push dword [esi]
call fcn.00440db7
xor eax, eax
pop ecx
mov dword [esi], eax
lea ecx, [ebp - 0x318]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, word [ebp - 0xc28]
jne 0x426a7d
sub ecx, edx
sar ecx, 1
push 2
pop edx
lea eax, [ecx + 1]
xor ecx, ecx
mov dword [ebp - 0xc2c], eax
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00440dea
mov dword [esi], eax
pop ecx
test eax, eax
je 0x426add
mov edx, dword [ebp - 0xc2c]
lea ecx, [ebp - 0x318]
push ecx
mov ecx, eax
call fcn.0040c040
test eax, eax
jns 0x426add
cmp dword [esi], 0
je 0x426add
push dword [esi]
call fcn.00440db7
xor eax, eax
pop ecx
mov dword [esi], eax
mov dword [edi + 0x4c], 1
cmp dword [edi + 0x30], 0
je 0x426afa
push dword [edi + 0x30]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor esi, esi
mov dword [edi + 0x30], esi
jmp 0x426afc
xor esi, esi
lea eax, [ebp - 0x318]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x426b7c
test al, 0x10
jne 0x426b7c
push esi
push 0x80
push 3
push esi
push 1
push SysReAllocStringLen
lea eax, [ebp - 0x318]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x426b7c
xor eax, eax
mov dword [ebp - 0xc28], eax
lea eax, [ebp - 0xc28]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edx, eax
cmp edx, 0xffffffff
je 0x426b6d
mov ecx, dword [ebp - 0xc28]
xor eax, eax
or eax, edx
xor edx, edx
or ecx, edx
cmp eax, dword [edi + 0x70]
jne 0x426b6d
cmp ecx, dword [edi + 0x74]
jne 0x426b6d
mov ebx, edx
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test ebx, ebx
je 0x426c09
xor ebx, ebx
push ebx
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateEventW]
push 0x64
pop ecx
mov dword [edi + 0x30], eax
mov dword [edi + 0x34], 1
call fcn.0041dc25
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [edi + 0x64], eax
cmp dword [edi + 0x30], ebx
je 0x426c11
mov eax, dword [edi + 0x80]
push ebx
push ebx
push ebx
mov esi, dword [eax]
push 0x8000080
push 2
pop ecx
push ecx
lea ecx, [ebp - 0x110]
push ecx
lea ecx, [ebp - 0xc20]
push ecx
mov ecx, dword [esi + 0x14]
push eax
call dword [0x445628]
call dword [esi + 0x14]
mov esi, eax
test esi, esi
js 0x426c13
jmp 0x426c00
push 0x258
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x426c13
cmp dword [edi + 0x34], ebx
je 0x426c13
mov ecx, edi
call fcn.00426424
mov esi, eax
mov ecx, dword [edi + 0x30]
test ecx, ecx
jne 0x426bdf
jmp 0x426c13
mov esi, dword [ebp - 0xc24]
jmp 0x426c13
mov esi, ebx
mov eax, esi
jmp 0x426c1c
mov eax, 0x80004005
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00441130
leave
ret