Function at 0x40fa30
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x43c
mov eax, dword [0x5023a4]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [0x506568]
mov dword [ebp - 0x438], ecx
push edi
test esi, esi
jne 0x40fa7b
push 0x20d0
call fcn.0049786c
add esp, 4
mov ecx, eax
call fcn.00414c70
mov ecx, eax
mov dword [0x506568], eax
mov edx, dword [eax]
call dword [edx]
mov esi, dword [0x506568]
xor edx, edx
mov ecx, 0xfa1
call fcn.00419b90
push 0x208
lea eax, [ebp - 0x210]
push 0
push eax
call fcn.0049b560
add esp, 0xc
lea eax, [ebp - 0x418]
push 0x208
push 0
push eax
call fcn.0049b560
add esp, 0xc
lea eax, [ebp - 0x210]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
lea eax, [ebp - 0x418]
push eax
push 0
push str.gppins
lea eax, [ebp - 0x210]
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
test eax, eax
je 0x40fb3f
xor ecx, ecx
nop word [eax + eax]
movzx eax, word [ebp + ecx - 0x418]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x212], ax
test ax, ax
jne 0x40faf0
lea ecx, [ebp - 0x210]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40fb11
sub ecx, edx
sar ecx, 1
lea ecx, [ecx*2 - 8]
cmp ecx, 0x208
jae 0x410598
xor eax, eax
mov word [ebp + ecx - 0x210], ax
jmp 0x40fb7b
lea edx, [ebp - 0x210]
add edx, 0xfffffffe
nop dword [eax + eax]
mov ax, word [edx + 2]
lea edx, [edx + 2]
test ax, ax
jne 0x40fb50
mov eax, dword [str.tmpgpp]
mov dword [edx], eax
mov eax, dword [0x4dc158]
mov dword [edx + 4], eax
mov eax, dword [0x4dc15c]
mov dword [edx + 8], eax
mov eax, dword [0x4dc160]
mov dword [edx + 0xc], eax
lea eax, [ebp - 0x210]
mov ecx, esi
push eax
sub esp, 0xc
call fcn.00413a20
call fcn.0040f5a0
xor edx, edx
mov ecx, 0xfa2
call fcn.00419b90
call fcn.004031c0
mov ecx, eax
test ecx, ecx
je 0x41058e
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x434], eax
mov eax, dword [0x506568]
test eax, eax
jne 0x40fbe7
push 0x20d0
call fcn.0049786c
add esp, 4
mov ecx, eax
call fcn.00414c70
mov ecx, eax
mov dword [0x506568], eax
mov edx, dword [eax]
call dword [edx]
mov eax, dword [0x506568]
add eax, 0x20c
push eax
lea eax, [ebp - 0x434]
push str._sApps
push eax
call fcn.004040c0
mov ecx, dword [0x506568]
add esp, 0xc
test ecx, ecx
jne 0x40fc30
push 0x20d0
call fcn.0049786c
add esp, 4
mov ecx, eax
call fcn.00414c70
mov ecx, eax
mov dword [0x506568], eax
mov edx, dword [eax]
call dword [edx]
mov ecx, dword [0x506568]
push 1
push ecx
push dword [ebp - 0x434]
call fcn.00411f80
call fcn.004031c0
mov ecx, eax
test ecx, ecx
je 0x41058e
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x430], eax
mov eax, dword [0x506568]
test eax, eax
jne 0x40fc88
push 0x20d0
call fcn.0049786c
add esp, 4
mov ecx, eax
call fcn.00414c70
mov ecx, eax
mov dword [0x506568], eax
mov edx, dword [eax]
call dword [edx]
mov eax, dword [0x506568]
add eax, 0x20c
push eax
lea eax, [ebp - 0x430]
push str._sMain
push eax
call fcn.004040c0
mov ecx, dword [0x506568]
add esp, 0xc
test ecx, ecx
jne 0x40fcd1
push 0x20d0
call fcn.0049786c
add esp, 4
mov ecx, eax
call fcn.00414c70
mov ecx, eax
mov dword [0x506568], eax
mov edx, dword [eax]
call dword [edx]
mov ecx, dword [0x506568]
push 2
push ecx
push dword [ebp - 0x430]
call fcn.00411f80
call fcn.004031c0
mov ecx, eax
test ecx, ecx
je 0x41058e
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x42c], eax
mov eax, dword [0x506568]
test eax, eax
jne 0x40fd29
push 0x20d0
call fcn.0049786c
add esp, 4
mov ecx, eax
call fcn.00414c70
mov ecx, eax
mov dword [0x506568], eax
mov edx, dword [eax]
call dword [edx]
mov eax, dword [0x506568]
add eax, 0x20c
push eax
lea eax, [ebp - 0x42c]
push str._sSDK
push eax
call fcn.004040c0
mov ecx, dword [0x506568]
add esp, 0xc
test ecx, ecx
jne 0x40fd72
push 0x20d0
call fcn.0049786c
add esp, 4
mov ecx, eax
call fcn.00414c70
mov ecx, eax
mov dword [0x506568], eax
mov edx, dword [eax]
call dword [edx]
mov ecx, dword [0x506568]
push 3
push ecx
push dword [ebp - 0x42c]
call fcn.00411f80
xor edi, edi
xor ebx, ebx
mov esi, dword [0x506568]
mov dword [ebp - 0x41c], edi
test esi, esi
jne 0x40fdb9
push 0x20d0
call fcn.0049786c
add esp, 4
mov ecx, eax
call fcn.00414c70
mov ecx, eax
mov dword [0x506568], eax
mov edx, dword [eax]
call dword [edx]
mov esi, dword [0x506568]
mov ecx, dword [esi + 0x1ea0]
mov eax, 0x7e07e07f
sub ecx, dword [esi + 0x1e9c]
imul ecx
sar edx, 9
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp edi, eax
jae 0x40ffae
test esi, esi
jne 0x40fe07
push 0x20d0
call fcn.0049786c
add esp, 4
mov ecx, eax
call fcn.00414c70
mov ecx, eax
mov dword [0x506568], eax
mov edx, dword [eax]
call dword [edx]
mov esi, dword [0x506568]
mov eax, esi
mov dword [ebp - 0x428], eax
test eax, eax
jne 0x40fe38
push 0x20d0
call fcn.0049786c
add esp, 4
mov ecx, eax
call fcn.00414c70
mov ecx, eax
mov dword [0x506568], eax
mov edx, dword [eax]
call dword [edx]
mov esi, dword [0x506568]
mov eax, esi
mov dword [ebp - 0x424], eax
test eax, eax
jne 0x40fe69
push 0x20d0
call fcn.0049786c
add esp, 4
mov ecx, eax
call fcn.00414c70
mov ecx, eax
mov dword [0x506568], eax
mov edx, dword [eax]
call dword [edx]
mov esi, dword [0x506568]
mov edi, dword [esi + 0x1e9c]
add edi, ebx
test esi, esi
jne 0x40fe94
push 0x20d0
call fcn.0049786c
add esp, 4
mov ecx, eax
call fcn.00414c70
mov ecx, eax
mov dword [0x506568], eax
mov edx, dword [eax]
call dword [edx]
mov eax, dword [ebp - 0x428]
add eax, 0x187c
push eax
mov eax, dword [ebp - 0x424]
add eax, 0x20c
push eax
push edi
call fcn.004126f0
mov edx, dword [0x506568]
mov esi, eax
test edx, edx
jne 0x40fee3
push 0x20d0
call fcn.0049786c
add esp, 4
mov ecx, eax
call fcn.00414c70
mov ecx, eax
mov dword [0x506568], eax
mov edx, dword [eax]
call dword [edx]
mov edx, dword [0x506568]
lea ecx, [ebx + 0x208]
add ecx, dword [edx + 0x1e9c]
nop
movzx eax, word [esi]
lea esi, [esi + 2]
mov word [ecx], ax
lea ecx, [ecx + 2]
test ax, ax
jne 0x40fef0
test edx, edx
jne 0x40ff2a
push 0x20d0
call fcn.0049786c
add esp, 4
mov ecx, eax
call fcn.00414c70
mov ecx, eax
mov dword [0x506568], eax
mov edx, dword [eax]
call dword [edx]
mov edx, dword [0x506568]
mov edi, dword [edx + 0x1e9c]
add edi, 0x208
test edx, edx
jne 0x40ff5f
push 0x20d0
call fcn.0049786c
add esp, 4
mov ecx, eax
call fcn.00414c70
mov ecx, eax
mov dword [0x506568], eax
mov edx, dword [eax]
call dword [edx]
mov edx, dword [0x506568]
mov esi, dword [edx + 0x1e9c]
add esi, ebx
test edx, edx
jne 0x40ff90
push 0x20d0
call fcn.0049786c
add esp, 4
mov ecx, eax
call fcn.00414c70
mov ecx, eax
mov dword [0x506568], eax
mov edx, dword [eax]
call dword [edx]
mov edx, dword [0x506568]
lea eax, [edi + ebx]
mov ecx, edx
push eax
push esi
call fcn.004127c0
mov edi, dword [ebp - 0x41c]
inc edi
add ebx, 0x410
jmp 0x40fd84
xor edi, edi
xor ebx, ebx
mov dword [ebp - 0x41c], ebx
mov dword [ebp - 0x424], edi
test esi, esi
jne 0x40ffe7
push 0x20d0
call fcn.0049786c
add esp, 4
mov ecx, eax
call fcn.00414c70
mov ecx, eax
mov dword [0x506568], eax
mov edx, dword [eax]
call dword [edx]
mov esi, dword [0x506568]
mov ecx, dword [esi + 0x1eac]
mov eax, 0x7e07e07f
sub ecx, dword [esi + 0x1ea8]
imul ecx
sar edx, 9
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp edi, eax
jae 0x410287
call fcn.004031c0
mov ecx, eax
test ecx, ecx
je 0x41058e
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x420], eax
mov eax, dword [0x506568]
test eax, eax
jne 0x410056
push 0x20d0
call fcn.0049786c
add esp, 4
mov ecx, eax
call fcn.00414c70
mov ecx, eax
mov dword [0x506568], eax
mov edx, dword [eax]
call dword [edx]
mov eax, dword [0x506568]
add eax, 0x20c
push eax
lea eax, [ebp - 0x420]
push str._sMain
push eax
call fcn.004040c0
mov eax, dword [0x506568]
add esp, 0xc
test eax, eax
jne 0x41009d
push 0x20d0
call fcn.0049786c
add esp, 4
mov ecx, eax
call fcn.00414c70
mov ecx, eax
mov dword [0x506568], eax
mov edx, dword [eax]
call dword [edx]
mov eax, dword [0x506568]
mov esi, dword [ebp - 0x420]
mov dword [ebp - 0x428], eax
cmp dword [esi - 4], 1
jle 0x4100c8
push dword [esi - 0xc]
lea ecx, [ebp - 0x420]
call fcn.00403890
mov esi, dword [ebp - 0x420]
mov eax, dword [0x506568]
test eax, eax
jne 0x4100f0
push 0x20d0
call fcn.0049786c
add esp, 4
mov ecx, eax
call fcn.00414c70
mov ecx, eax
mov dword [0x506568], eax
mov edx, dword [eax]
call dword [edx]
mov eax, dword [0x506568]
mov edi, dword [eax + 0x1ea8]
add edi, ebx
test eax, eax
jne 0x41011b
push 0x20d0
call fcn.0049786c
add esp, 4
mov ecx, eax
call fcn.00414c70
mov ecx, eax
mov dword [0x506568], eax
mov edx, dword [eax]
call dword [edx]
mov eax, dword [ebp - 0x428]
add eax, 0x414
push eax
push esi
push edi
call fcn.004126f0
mov edi, eax
mov eax, dword [0x506568]
test eax, eax
jne 0x41015d
push 0x20d0
call fcn.0049786c
add esp, 4
mov ecx, eax
call fcn.00414c70
mov ecx, eax
mov dword [0x506568], eax
mov edx, dword [eax]
call dword [edx]
mov eax, dword [0x506568]
mov eax, dword [eax + 0x1ea8]
lea ecx, [ebx + 0x208]
add ecx, eax
nop dword [eax + eax]
movzx eax, word [edi]
lea edi, [edi + 2]
mov word [ecx], ax
lea ecx, [ecx + 2]
test ax, ax
jne 0x410170
push dword [esi - 8]
push esi
call fcn.004a38d8
add esp, 8
test eax, eax
js 0x41059d
cmp eax, dword [esi - 8]
jg 0x41059d
xor ecx, ecx
mov dword [esi - 0xc], eax
mov word [esi + eax*2], cx
mov ecx, dword [0x506568]
test ecx, ecx
jne 0x4101d6
push 0x20d0
call fcn.0049786c
add esp, 4
mov ecx, eax
call fcn.00414c70
mov ecx, eax
mov dword [0x506568], eax
mov edx, dword [eax]
call dword [edx]
mov ecx, dword [0x506568]
mov ebx, dword [ecx + 0x1ea8]
mov eax, dword [ebp - 0x41c]
add ebx, eax
test ecx, ecx
jne 0x410213
push 0x20d0
call fcn.0049786c
add esp, 4
mov ecx, eax
call fcn.00414c70
mov ecx, eax
mov dword [0x506568], eax
mov edx, dword [eax]
call dword [edx]
mov ecx, dword [0x506568]
mov eax, dword [ebp - 0x41c]
mov edi, dword [ecx + 0x1ea8]
add edi, eax
test ecx, ecx
jne 0x410244
push 0x20d0
call fcn.0049786c
add esp, 4
mov ecx, eax
call fcn.00414c70
mov ecx, eax
mov dword [0x506568], eax
mov edx, dword [eax]
call dword [edx]
mov ecx, dword [0x506568]
lea eax, [ebx + 0x208]
push eax
push edi
call fcn.004127c0
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x410269
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov edi, dword [ebp - 0x424]
mov ebx, dword [ebp - 0x41c]
inc edi
mov esi, dword [0x506568]
add ebx, 0x410
jmp 0x40ffb2
xor edi, edi
xor ebx, ebx
mov dword [ebp - 0x420], ebx
mov dword [ebp - 0x428], edi
test esi, esi
jne 0x4102c0
push 0x20d0
call fcn.0049786c
add esp, 4
mov ecx, eax
call fcn.00414c70
mov ecx, eax
mov dword [0x506568], eax
mov edx, dword [eax]
call dword [edx]
mov esi, dword [0x506568]
mov ecx, dword [esi + 0x1eb8]
mov eax, 0x7e07e07f
sub ecx, dword [esi + 0x1eb4]
imul ecx
sar edx, 9
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp edi, eax
jae 0x4104ee
call fcn.004031c0
mov ecx, eax
test ecx, ecx
je 0x41058e
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x424], eax
mov eax, dword [0x506568]
test eax, eax
jne 0x41032f
push 0x20d0
call fcn.0049786c
add esp, 4
mov ecx, eax
call fcn.00414c70
mov ecx, eax
mov dword [0x506568], eax
mov edx, dword [eax]
call dword [edx]
mov eax, dword [0x506568]
add eax, 0x20c
push eax
lea eax, [ebp - 0x424]
push str._sSDK
push eax
call fcn.004040c0
mov esi, dword [0x506568]
add esp, 0xc
test esi, esi
jne 0x410378
push 0x20d0
call fcn.0049786c
add esp, 4
mov ecx, eax
call fcn.00414c70
mov ecx, eax
mov dword [0x506568], eax
mov edx, dword [eax]
call dword [edx]
mov esi, dword [0x506568]
mov esi, dword [esi + 0x1eb4]
add esi, ebx
call fcn.004031c0
mov ecx, eax
test ecx, ecx
je 0x41058e
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
lea ecx, [ebp - 0x41c]
push esi
mov dword [ebp - 0x41c], eax
call fcn.004034f0
test al, al
jne 0x4103dc
test esi, esi
jne 0x4103b5
xor ecx, ecx
jmp 0x4103cf
mov ecx, esi
lea edx, [ecx + 2]
nop word [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4103c0
sub ecx, edx
sar ecx, 1
push ecx
push esi
lea ecx, [ebp - 0x41c]
call fcn.00403760
mov eax, dword [0x506568]
test eax, eax
jne 0x410409
push 0x20d0
call fcn.0049786c
add esp, 4
mov ecx, eax
call fcn.00414c70
mov ecx, eax
mov dword [0x506568], eax
mov edx, dword [eax]
call dword [edx]
mov eax, dword [0x506568]
mov edi, dword [ebp - 0x424]
lea ecx, [ebp - 0x41c]
add eax, 0x1a84
push eax
push edi
call fcn.0040f2a0
mov ecx, dword [0x506568]
test ecx, ecx
jne 0x410450
push 0x20d0
call fcn.0049786c
add esp, 4
mov ecx, eax
call fcn.00414c70
mov ecx, eax
mov dword [0x506568], eax
mov edx, dword [eax]
call dword [edx]
mov ecx, dword [0x506568]
mov ebx, dword [ecx + 0x1eb4]
add ebx, dword [ebp - 0x420]
test ecx, ecx
jne 0x410485
push 0x20d0
call fcn.0049786c
add esp, 4
mov ecx, eax
call fcn.00414c70
mov ecx, eax
mov dword [0x506568], eax
mov edx, dword [eax]
call dword [edx]
mov ecx, dword [0x506568]
mov esi, dword [ebp - 0x41c]
push esi
push ebx
call fcn.004127c0
test eax, eax
je 0x41049f
mov eax, dword [ebp - 0x438]
mov byte [eax], 1
or ebx, 0xffffffff
add esi, 0xfffffff0
mov eax, ebx
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x4104b9
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
add edi, 0xfffffff0
mov eax, ebx
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x4104d0
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
mov edi, dword [ebp - 0x428]
mov ebx, dword [ebp - 0x420]
inc edi
mov esi, dword [0x506568]
add ebx, 0x410
jmp 0x41028b
mov ebx, dword [ebp - 0x438]
cmp byte [ebx], 0
je 0x410525
cmp dword [0x506570], 0
jne 0x41051e
push 4
call fcn.0049786c
add esp, 4
mov dword [0x506570], eax
mov ecx, eax
mov dword [eax], vtable.RelativeProduct.0
call sym.Setup.exe_public_virtual:_void___thiscall_DuiLib::WindowImplBase::InitWindow_void_
call fcn.00417be0
mov byte [ebx], al
mov edx, dword [ebp - 0x42c]
or ebx, 0xffffffff
add edx, 0xfffffff0
mov eax, ebx
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x410545
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x430]
mov eax, ebx
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x410562
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x434]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], ebx
dec ebx
test ebx, ebx
jg 0x41057d
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0049765c
mov esp, ebp
pop ebp
ret
push 0x80004005
call fcn.00402f10
call fcn.00497791
push 0x80070057
call fcn.00402f10
int3