Function at 0x406420
Capabilities:
Create directory
Get common file path
Terminate process

Disassembly:
sub esp, 0x380
push ebx
push ebp
push esi
mov esi, dword [esp + 0x390]
xor ebx, ebx
push edi
cmp esi, ebx
mov dword [esp + 0x20], ecx
mov dword [esp + 0x14], ebx
je 0x4066c2
mov edi, dword [esp + 0x398]
cmp edi, ebx
je 0x4066c2
push 0x5c
push esi
call fcn.004271e0
add esp, 8
test eax, eax
je 0x4066c2
or ebp, 0xffffffff
xor eax, eax
mov ecx, ebp
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x4066c2
lea ecx, [esp + 0x254]
call fcn.004238d0
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x4d]
mov byte [esp + 0x4c], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [esp + 0x4c]
mov dword [esp + 0x28], ebp
push eax
push 0x104
mov dword [esp + 0x34], ebp
mov dword [esp + 0x38], ebp
mov dword [esp + 0x3c], 0x4000
mov dword [esp + 0x40], ebx
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
lea ecx, [esp + 0x4c]
push ebx
push ecx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov edx, dword [0x437348]
push 0x5c
push esi
mov dword [esp + 0x18], edx
call fcn.004271e0
add esp, 8
inc eax
lea ecx, [esp + 0x10]
push eax
lea eax, [esp + 0x50]
push eax
push str._s_s
push ecx
call fcn.004025c0
mov edx, dword [esp + 0x20]
push ebx
push edx
push esi
call fcn.00425b10
add esp, 0x1c
test eax, eax
jne 0x40652f
push ebp
lea eax, [esp + 0x18]
push 0x13e
push eax
call fcn.004249d0
mov ecx, dword [esp + 0x20]
push ebx
push 0x10
push ecx
call fcn.00424c50
add esp, 0x18
push ebx
call fcn.0042a54c
mov edx, dword [esp + 0x10]
lea eax, [esp + 0x28]
push edx
mov edi, 1
push eax
push ebp
lea ecx, [esp + 0x260]
mov dword [esp + 0x48], ebp
mov dword [esp + 0x4c], 2
mov dword [esp + 0x50], edi
mov dword [esp + 0x54], ebx
call fcn.00423990
test eax, eax
jne 0x406628
lea ecx, [esp + 0x254]
call fcn.00423d20
cmp eax, ebx
je 0x40661c
lea ecx, [esp + 0x18]
mov edx, dword [eax]
push ecx
lea ecx, [esp + 0x2c]
push ecx
lea ecx, [esp + 0x2c]
push ecx
lea ecx, [esp + 0x48]
push ecx
mov ecx, eax
mov dword [esp + 0x28], ebx
mov dword [esp + 0x34], 3
call dword [edx + 0x4c]
cmp dword [esp + 0x18], ebx
je 0x40661c
mov esi, dword [esp + 0x398]
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ecx, dword [esp + 0x18]
push eax
push esi
push edi
mov edx, dword [ecx]
call dword [edx + 0x2c]
cmp eax, ebx
jne 0x406611
mov ecx, dword [esp + 0x18]
lea edx, [esp + 0x1c]
mov dword [esp + 0x1c], ebx
push edx
mov eax, dword [ecx]
push 3
call dword [eax + 0x24]
mov esi, dword [esp + 0x20]
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x18]
mov dword [esp + 0x14], edi
mov dword [esi + 4], eax
lea eax, [esp + 0x1c]
mov edx, dword [ecx]
push eax
push 0x80000009
call dword [edx + 0x24]
mov ecx, dword [esp + 0x1c]
add ecx, 0xffffffd0
cmp ecx, 9
jne 0x40661c
mov edx, dword [esi + 0x1c]
mov dword [esp + 0x14], edx
jmp 0x40661c
cmp eax, 0x11012
jne 0x40661c
mov dword [esp + 0x14], edi
lea ecx, [esp + 0x254]
call fcn.00423cf0
mov eax, dword [esp + 0x10]
push eax
call fcn.00425b50
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x155]
mov byte [esp + 0x154], bl
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x14]
add esp, 4
stosw word es:[edi], ax
push ecx
lea edx, [esp + 0x154]
push str._s.bak
push edx
stosb byte es:[edi], al
call fcn.00429590
lea eax, [esp + 0x15c]
push eax
call fcn.00425b50
mov eax, dword [esp + 0x20]
mov edx, dword [0x43734c]
add esp, 0x10
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x4066a5
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x4066a5
mov edx, dword [esp + 0x10]
add edx, 0xfffffff4
push edx
call fcn.004292c0
add esp, 4
lea ecx, [esp + 0x254]
call fcn.00423940
mov eax, dword [esp + 0x14]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x380
ret 8
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x380
ret 8