Function at 0x404670
Capabilities:
Get common file path

Disassembly:
mov eax, 0x1420
call fcn.00416960
mov eax, dword [0x43e270]
xor eax, esp
mov dword [esp + 0x141c], eax
push ebx
mov ebx, edx
push esi
mov esi, ecx
mov dword [esp + 0x20], esi
mov dword [esp + 0x1c], ebx
test ebx, ebx
je 0x4046d1
mov eax, ebx
lea edx, [eax + 2]
nop
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4046a0
sub eax, edx
sar eax, 1
je 0x4046d1
mov edx, ebx
call fcn.00402350
test eax, eax
je 0x4046ea
push ebx
push str.Create_Director_Fail__:___s_
mov ecx, eax
mov edx, 0x440628
call fcn.00403a30
add esp, 8
pop esi
xor al, al
pop ebx
mov ecx, dword [esp + 0x141c]
xor ecx, esp
call fcn.0040c641
add esp, 0x1420
ret
push 0x800
lea eax, [esp + 0xc28]
push 0
push eax
call fcn.0040d9a0
push 0x200
lea ecx, [esp + 0x234]
push 0
push ecx
call fcn.0040d9a0
add esp, 0x18
lea edx, [esp + 0x224]
push edx
push 0x100
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
test eax, eax
jne 0x404742
push 0x200
push eax
lea eax, [esp + 0x22c]
push eax
call fcn.0040d9a0
add esp, 0xc
call dword [sym.imp.KERNEL32.dll_GetTickCount]
inc eax
push eax
lea ecx, [esp + 0x228]
push ecx
push str._s_04x
lea edx, [esp + 0xc30]
call fcn.004029a0
add esp, 0xc
lea ecx, [esp + 0xc24]
call fcn.00401830
lea edx, [esp + 0xc24]
call fcn.00402350
push ebp
mov dword [esp + 0x18], 0
mov byte [esp + 0xf], 1
push edi
lea ecx, [ecx]
push 0x200
xor edi, edi
lea edx, [esp + 0x30]
push edi
push edx
call fcn.0040d9a0
mov eax, dword [esp + 0x28]
push eax
push str.FILE_d
lea edx, [esp + 0x40]
mov dword [esp + 0x34], edi
mov dword [esp + 0x28], edi
call fcn.004037f0
add esp, 0x14
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x24]
push edx
lea eax, [esp + 0x34]
push eax
push str.FILEINFO
push esi
call fcn.00404db0
mov ebp, dword [esp + 0x20]
cmp eax, edi
jne 0x40493d
mov ecx, dword [ebp]
lea edx, [esp + 0x18]
push edx
lea eax, [esp + 0x18]
push eax
mov dword [esp + 0x20], ecx
lea ecx, [ebp + 8]
push ecx
push 0x435a68
push esi
call fcn.00404db0
test eax, eax
jne 0x404962
push 0x800
push eax
cmp dword [ebp + 4], eax
je 0x4048a1
lea edx, [esp + 0x434]
push edx
call fcn.0040d9a0
lea eax, [ebp + 0x208]
push eax
lea eax, [esp + 0xc3c]
push eax
push 0x43470c
lea edx, [esp + 0x444]
call fcn.004029a0
mov ecx, dword [esp + 0x30]
mov edi, dword [esp + 0x2c]
add esp, 0x18
push ecx
push edi
lea ebx, [esp + 0x434]
call fcn.00405270
mov esi, eax
test esi, esi
jne 0x404986
mov edx, dword [esp + 0x24]
push eax
push edx
mov eax, ebx
push eax
call fcn.0042fe40
add esp, 0xc
test al, al
lea eax, [ebp + 0x208]
mov ecx, 0x440628
push eax
je 0x404990
push str.Extract__s_success
call fcn.00403b70
add esp, 8
jmp 0x404918
lea ecx, [esp + 0x434]
push ecx
call fcn.0040d9a0
mov eax, ebx
add esp, 0xc
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4048b6
sub eax, edx
sar eax, 1
cmp word [ebx + eax*2 - 2], 0x5c
jne 0x4048dc
lea edx, [ebp + 0x208]
push edx
push ebx
push 0x4351e8
jmp 0x4048e9
lea eax, [ebp + 0x208]
push eax
push ebx
push 0x43470c
lea edx, [esp + 0x438]
call fcn.004029a0
mov ecx, dword [esp + 0x24]
mov edi, dword [esp + 0x20]
add esp, 0xc
push ecx
push edi
lea ebx, [esp + 0x434]
call fcn.00405270
mov esi, eax
test esi, esi
jne 0x40499c
mov ebx, dword [sym.imp.KERNEL32.dll_GlobalFree]
push ebp
call ebx
push edi
call ebx
inc dword [esp + 0x1c]
test esi, esi
jne 0x4049bd
mov ebx, dword [esp + 0x24]
mov esi, dword [esp + 0x28]
jmp 0x404790
lea edx, [esp + 0x2c]
push edx
push str.FILEINFO
push str.Get_resource_fail_____s__s_
mov ecx, eax
mov edx, 0x440628
call fcn.00403a30
add esp, 0xc
mov byte [esp + 0x13], 1
jmp 0x4049bd
lea ecx, [esp + 0x2c]
push ecx
push str.FILEINFO
push str.Get_resource_fail_____s__s_
mov ecx, eax
mov edx, 0x440628
call fcn.00403a30
mov edi, dword [esp + 0x20]
add esp, 0xc
jmp 0x4049b8
lea edx, [esp + 0x42c]
push edx
jmp 0x4049a4
push str.Extract__s_fail___
call fcn.00403b70
jmp 0x4049b5
lea ecx, [esp + 0x42c]
push ecx
push str.Create_file_fail_____s_
mov ecx, esi
mov edx, 0x440628
call fcn.00403a30
add esp, 8
mov byte [esp + 0x13], 0
test ebp, ebp
je 0x4049c8
push ebp
call dword [sym.imp.KERNEL32.dll_GlobalFree]
test edi, edi
je 0x4049d3
push edi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
lea ecx, [esp + 0xc2c]
call fcn.00401830
mov ecx, dword [esp + 0x142c]
mov al, byte [esp + 0x13]
pop edi
pop ebp
pop esi
pop ebx
xor ecx, esp
call fcn.0040c641
add esp, 0x1420
ret