Function at 0x412e30
Capabilities:
Create directory
Get common file path
Set current directory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x596d5c
mov eax, dword fs:[0]
push eax
sub esp, 0xc2c
mov eax, dword [0x60dfd4]
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, ecx
mov dword [ebp - 0xc38], ebx
push 0x208
lea eax, [ebp - 0x420]
push 0
push eax
call fcn.0056eeb0
add esp, 0xc
call fcn.00421571
mov edi, eax
test edi, edi
je 0x413320
mov eax, dword [edi]
mov esi, dword [eax + 0xc]
mov ecx, esi
call dword [0x5a72d4]
mov ecx, edi
call esi
lea esi, [eax + 0x10]
mov dword [ebp - 0xc24], esi
mov eax, 0x5e8e78
mov dword [ebp - 4], 0
test eax, 0xffff0000
jne 0x412ed4
movzx edi, ax
push edi
call fcn.0042e288
test eax, eax
je 0x412eec
push edi
push eax
lea ecx, [ebp - 0xc24]
call fcn.004103f0
jmp 0x412ee6
push 0
push 0x5e8e78
lea ecx, [ebp - 0xc24]
call fcn.004050e0
mov esi, dword [ebp - 0xc24]
push 0x104
lea edi, [ebx + 0xcc8]
mov dword [ebp - 4], 1
push edi
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push 0x100
lea eax, [ebp - 0xa20]
push eax
push 0x100
lea eax, [ebp - 0xc20]
push eax
push 0x100
lea eax, [ebp - 0x820]
push eax
push 3
lea eax, [ebp - 0x18]
push eax
push edi
call fcn.00576036
add esp, 0x24
test eax, eax
je 0x412f54
mov ecx, str.Setup___Init_tick_and_file_size__error_code__d_
push eax
push ecx
call fcn.0041c4c0
add esp, 8
xor ebx, ebx
jmp 0x4132d4
push 0
push 0
lea eax, [ebp - 0x820]
push eax
lea eax, [ebp - 0x18]
push eax
push 0x208
push edi
call fcn.0057621f
add esp, 0x18
test eax, eax
je 0x412f8b
mov ecx, str.Setup___Init__wmakepath_s_failed_with__d
push eax
push ecx
call fcn.0041c4c0
add esp, 8
xor ebx, ebx
jmp 0x4132d4
push edi
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
test eax, eax
jne 0x412fb1
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Setup___Init_SetCurrentDirectory_failed_with__d
call fcn.0041c4c0
add esp, 8
xor ebx, ebx
jmp 0x4132d4
lea edx, [ebp - 0x420]
lea ecx, [ebp - 0xc28]
call fcn.00416720
lea eax, [ebp - 0x420]
push eax
lea eax, [ebp - 0x218]
push eax
call fcn.00416a70
call fcn.00421571
mov edi, eax
test edi, edi
je 0x41332a
mov eax, dword [edi]
mov esi, dword [eax + 0xc]
mov ecx, esi
call dword [0x5a72d4]
mov ecx, edi
call esi
lea esi, [eax + 0x10]
mov dword [ebp - 0xc28], esi
lea eax, [ebp - 0x218]
mov byte [ebp - 4], 2
test eax, 0xffff0000
jne 0x41302b
movzx edi, ax
push edi
call fcn.0042e288
test eax, eax
je 0x41305c
push edi
push eax
lea ecx, [ebp - 0xc28]
call fcn.004103f0
jmp 0x413056
lea ecx, [ebp - 0x218]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x413034
sub ecx, edx
lea eax, [ebp - 0x218]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0xc28]
call fcn.004050e0
mov esi, dword [ebp - 0xc28]
mov byte [ebp - 4], 3
lea ecx, [esi - 0x10]
mov edi, dword [ebx + 0x58]
sub edi, 0x10
mov dword [ebp - 0xc30], ecx
mov dword [ebp - 0xc34], edi
cmp ecx, edi
je 0x4130db
cmp dword [edi + 0xc], 0
jl 0x4130c9
mov eax, dword [ecx]
cmp eax, dword [edi]
jne 0x4130c9
call fcn.00404fd0
mov dword [ebp - 0xc2c], eax
lea edx, [edi + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4130c1
push dword [ebp - 0xc34]
lfence
mov edi, dword [edi]
mov edx, dword [edi]
mov esi, dword [edx + 4]
mov ecx, esi
call dword [0x5a72d4]
mov ecx, edi
call esi
mov eax, dword [ebp - 0xc2c]
add eax, 0x10
mov dword [ebx + 0x58], eax
jmp 0x4130d5
push dword [esi - 0xc]
lea ecx, [ebx + 0x58]
push esi
call fcn.004050e0
mov ecx, dword [ebp - 0xc30]
mov byte [ebp - 4], 1
or eax, 0xffffffff
lock xadd dword [ecx + 0xc], eax
dec eax
test eax, eax
jg 0x413103
lfence
mov edi, dword [ecx]
push ecx
mov eax, dword [edi]
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x5a72d4]
mov ecx, edi
call esi
lea ecx, [ebp - 0x420]
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x413110
sub ecx, edx
lea eax, [ebp - 0x420]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0xc24]
call fcn.004050e0
mov esi, dword [ebp - 0xc24]
lea ecx, [ebx + 0x14e8]
mov edi, dword [ecx]
sub edi, 0x10
lea edx, [esi - 0x10]
cmp edx, edi
je 0x4131a9
cmp dword [edi + 0xc], 0
jl 0x4131a0
mov eax, dword [edx]
cmp eax, dword [edi]
jne 0x4131a0
mov ecx, edx
call fcn.00404fd0
mov dword [ebp - 0xc2c], eax
lea edx, [edi + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x413195
lfence
mov ebx, dword [edi]
push edi
mov edx, dword [ebx]
mov edi, dword [edx + 4]
mov ecx, edi
call dword [0x5a72d4]
mov ecx, ebx
call edi
mov ebx, dword [ebp - 0xc38]
mov eax, dword [ebp - 0xc2c]
add eax, 0x10
mov dword [ebx + 0x14e8], eax
jmp 0x4131a9
push dword [esi - 0xc]
push esi
call fcn.004050e0
lea eax, [ebx + 0x1b0c]
push eax
call fcn.004170d0
push 0x200
lea eax, [ebp - 0x620]
push 0
push eax
call fcn.0056eeb0
add esp, 0xc
lea eax, [ebp - 0x620]
push 0x100
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
test eax, eax
jne 0x4131fc
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Setup___Init_GetWindowsDirectory_failed_with__d
call fcn.0041c4c0
add esp, 8
xor ebx, ebx
jmp 0x4132d4
lea eax, [ebp - 0x620]
push eax
push str._sInstaller_
lea edi, [ebx + 0x8b4]
push 0x100
push edi
call fcn.00402fd0
add esp, 0x10
push 0
push edi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
push edi
push 0x5eb324
lea eax, [ebx + 0x14ec]
push 0x100
push eax
call fcn.00402fd0
lea eax, [ebx + 0x14ec]
add esp, 0x10
test eax, eax
je 0x413257
push 0x104
push eax
call fcn.005754d7
add esp, 8
push edi
xor ecx, ecx
push str._sTemp
mov dword [ebx + eax*2 + 0x14ec], ecx
lea eax, [ebx + 0x16f4]
push 0x100
push eax
call fcn.00402fd0
lea eax, [ebx + 0x16f4]
add esp, 0x10
test eax, eax
je 0x413292
push 0x104
push eax
call fcn.005754d7
add esp, 8
xor ecx, ecx
push edi
mov dword [ebx + eax*2 + 0x16f4], ecx
lea eax, [ebx + 0x18fc]
push 0x104
push eax
call fcn.0057580b
lea eax, [ebx + 0x18fc]
add esp, 0xc
test eax, eax
je 0x4132c8
push 0x104
push eax
call fcn.005754d7
add esp, 8
xor ecx, ecx
mov dword [ebx + eax*2 + 0x18fc], ecx
lea ebx, [ecx + 1]
mov dword [ebp - 4], 0xffffffff
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x413302
lfence
mov edi, dword [esi]
push esi
mov edx, dword [edi]
mov esi, dword [edx + 4]
mov ecx, esi
call dword [0x5a72d4]
mov ecx, edi
call esi
mov eax, ebx
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.0056a6fa
mov esp, ebp
pop ebp
ret
push 0x80004005
call fcn.00403ba0
push 0x80004005
call fcn.00403ba0
int3