Function at 0x40fb30
Capabilities:
Get common file path

Disassembly:
push 0xffffffffffffffff
push 0x4c8fc8
mov eax, dword fs:[0]
push eax
sub esp, 0x51c
mov eax, dword [0x4fcb54]
xor eax, esp
mov dword [esp + 0x518], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4fcb54]
xor eax, esp
push eax
lea eax, [esp + 0x530]
mov dword fs:[0], eax
mov ebp, dword [esp + 0x540]
call fcn.00484590
xor ecx, ecx
xor ebx, ebx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x40fb8e
push 0x80004005
call fcn.004021e0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x14], eax
push 0x104
lea ecx, [esp + 0x28]
push ecx
mov dword [esp + 0x540], ebx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
lea eax, [esp + 0x24]
lea esi, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
add eax, 1
cmp cl, bl
jne 0x40fbc0
sub eax, esi
push eax
lea edx, [esp + 0x28]
push edx
lea ecx, [esp + 0x1c]
call fcn.00402430
push 0x4e2d74
lea eax, [esp + 0x18]
call fcn.0040d3b0
mov eax, dword [esp + 0x14]
push ecx
add eax, 0xfffffff0
mov dword [esp + 0x1c], esp
mov esi, esp
push eax
call fcn.00402860
add eax, 0x10
mov dword [esi], eax
mov byte [esp + 0x540], 1
mov ecx, esp
mov dword [esp + 0x24], esp
push str._SystemFolder
call fcn.00402520
mov esi, dword [0x502e48]
add esi, 0xc8
mov byte [esp + 0x540], bl
call fcn.0040cd50
push 0x104
lea eax, [esp + 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
lea eax, [esp + 0x24]
lea esi, [eax + 1]
mov cl, byte [eax]
add eax, 1
cmp cl, bl
jne 0x40fc48
sub eax, esi
push eax
lea ecx, [esp + 0x28]
push ecx
lea ecx, [esp + 0x1c]
call fcn.00402430
push 0x4e2d74
lea eax, [esp + 0x18]
call fcn.0040d3b0
mov eax, dword [esp + 0x14]
push ecx
add eax, 0xfffffff0
mov dword [esp + 0x20], esp
mov esi, esp
push eax
call fcn.00402860
add eax, 0x10
mov dword [esi], eax
mov byte [esp + 0x540], 2
mov ecx, esp
mov dword [esp + 0x20], esp
push str._WindowsFolder
call fcn.00402520
mov esi, dword [0x502e48]
add esi, 0xc8
mov byte [esp + 0x540], bl
call fcn.0040cd50
lea edx, [esp + 0x24]
push edx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
test eax, eax
jbe 0x40fcfc
lea eax, [esp + 0x24]
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
cmp cl, bl
jne 0x40fcd4
sub eax, edx
push eax
lea eax, [esp + 0x28]
push eax
lea ecx, [esp + 0x1c]
call fcn.00402430
push 0x4e2d74
lea eax, [esp + 0x18]
call fcn.0040d3b0
mov edi, dword [esp + 0x14]
push ecx
add edi, 0xfffffff0
mov dword [esp + 0x20], esp
mov esi, esp
push edi
call fcn.00402860
add eax, 0x10
mov dword [esi], eax
mov byte [esp + 0x540], 3
mov ecx, esp
mov dword [esp + 0x20], esp
push str._TempFolder
call fcn.00402520
mov esi, dword [0x502e48]
add esi, 0xc8
mov byte [esp + 0x540], bl
call fcn.0040cd50
mov eax, dword [ebp + 4]
push ecx
sub eax, 0x10
mov dword [esp + 0x20], esp
mov esi, esp
push eax
call fcn.00402860
add eax, 0x10
mov dword [esi], eax
mov byte [esp + 0x540], 4
mov ecx, esp
mov dword [esp + 0x20], esp
push str._SourceFolder
call fcn.00402520
mov esi, dword [0x502e48]
add esi, 0xc8
mov byte [esp + 0x540], bl
call fcn.0040cd50
push ecx
mov ecx, esp
mov dword [esp + 0x20], esp
push str.IRBOOTSTRAP20
call fcn.00402520
push ecx
mov byte [esp + 0x540], 5
mov ecx, esp
mov dword [esp + 0x20], esp
push str._IR_ProductID
call fcn.00402520
mov esi, dword [0x502e48]
add esi, 0xc8
mov byte [esp + 0x540], bl
call fcn.0040cd50
push 0x104
lea ecx, [esp + 0x12c]
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push ecx
lea edx, [esp + 0x12c]
mov ecx, esp
mov dword [esp + 0x20], esp
push edx
call fcn.00402520
push ecx
mov byte [esp + 0x540], 6
mov ecx, esp
mov dword [esp + 0x20], esp
push str._SourceFilename
call fcn.00402520
mov esi, dword [0x502e48]
add esi, 0xc8
mov byte [esp + 0x540], bl
call fcn.0040cd50
push 0x100
lea eax, [esp + 0x230]
push eax
push 0x100
lea ecx, [esp + 0x338]
push ecx
push 0x100
lea edx, [esp + 0x440]
push edx
push 3
lea eax, [esp + 0x3c]
push eax
lea ecx, [esp + 0x148]
push ecx
call fcn.004a4a22
add esp, 0x20
lea edx, [esp + 0x24]
mov ecx, esp
mov dword [esp + 0x20], esp
push edx
call fcn.00402520
push ecx
mov byte [esp + 0x540], 7
mov ecx, esp
mov dword [esp + 0x20], esp
push str._SourceDrive
call fcn.00402520
mov esi, dword [0x502e48]
add esi, 0xc8
mov byte [esp + 0x540], bl
call fcn.0040cd50
mov dword [esp + 0x538], 0xffffffff
lea eax, [edi + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40fecb
mov ecx, dword [edi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push edi
call eax
mov ecx, dword [esp + 0x530]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x518]
xor ecx, esp
call fcn.004a3135
add esp, 0x528
ret 4