Function at 0x4054e0
Capabilities:
Get common file path

Disassembly:
push 0xffffffffffffffff
push 0x412bdb
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x63c
mov eax, dword [esp + 0x64c]
push ebx
xor ebx, ebx
push ebp
push esi
cmp eax, ebx
push edi
mov dword [esp + 0x30], ecx
je 0x405717
cmp dword [esp + 0x660], ebx
je 0x405717
push eax
lea eax, [esp + 0x240]
push eax
call fcn.00406740
add esp, 8
test eax, eax
je 0x405717
lea ecx, [esp + 0x444]
mov word [esp + 0x34], bx
push ecx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
test eax, eax
je 0x40556f
lea edx, [esp + 0x34]
lea eax, [esp + 0x444]
push edx
push ebx
push 0x415534
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
cmp word [esp + 0x34], bx
je 0x405717
call fcn.004058b0
mov esi, eax
cmp esi, ebx
je 0x405717
push esi
call fcn.00406810
mov edi, eax
push esi
mov dword [esp + 0x1c], edi
call fcn.004072d0
add esp, 8
cmp edi, ebx
je 0x405717
mov cl, byte [esp + 0x2b]
mov dword [esp + 0x1c], ebx
mov byte [esp + 0x18], cl
mov dword [esp + 0x20], ebx
mov dword [esp + 0x24], ebx
lea edx, [esp + 0x23c]
push 0x415524
push edx
mov dword [esp + 0x65c], ebx
call fcn.004082f4
mov ebp, eax
add esp, 8
cmp ebp, ebx
je 0x40563f
lea eax, [esp + 0x34]
push 0x41552c
push eax
call fcn.004082f4
mov esi, eax
add esp, 8
cmp esi, ebx
je 0x405636
push esi
push edi
push ebp
call fcn.00406e10
add esp, 0xc
test eax, eax
push esi
jne 0x405623
call fcn.0040738c
add esp, 4
lea ecx, [esp + 0x18]
lea edx, [esp + 0x34]
push 1
push ecx
mov ecx, dword [esp + 0x38]
push edx
call fcn.00405110
jmp 0x40562b
call fcn.0040738c
add esp, 4
lea eax, [esp + 0x34]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push ebp
call fcn.0040738c
add esp, 4
mov ebx, dword [esp + 0x1c]
mov ecx, dword [esp + 0x20]
cmp ebx, ecx
mov ebp, ebx
je 0x4056e7
mov edi, ebx
mov dword [esp + 0x10], edi
mov edx, dword [esp + 0x660]
mov eax, dword [edx + 4]
mov edx, dword [edx + 8]
cmp eax, edx
je 0x40567d
mov esi, dword [ebp + 0x800]
cmp esi, dword [eax]
je 0x405679
add eax, 4
cmp eax, edx
jne 0x40566e
cmp eax, edx
jne 0x4056cb
lea eax, [ebp + 0x804]
mov ebx, ecx
cmp eax, ecx
je 0x4056ad
mov edx, edi
mov esi, eax
mov edi, edx
add eax, 0x804
mov ecx, 0x201
add edx, 0x804
cmp eax, ebx
rep movsd dword es:[edi], dword [esi]
jne 0x40568b
mov ecx, dword [esp + 0x20]
mov edi, dword [esp + 0x10]
mov ebx, dword [esp + 0x1c]
add ecx, 0xfffff7fc
sub ebp, 0x804
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x20], ecx
sub edi, 0x804
add ebp, 0x804
add edi, 0x804
cmp ebp, ecx
mov dword [esp + 0x10], edi
jne 0x405657
mov edi, dword [esp + 0x14]
test ebx, ebx
je 0x405704
mov edx, ecx
mov eax, 0x7fc01ff1
sub edx, ebx
imul edx
sar edx, 0xa
mov eax, edx
shr eax, 0x1f
add edx, eax
mov ebp, edx
jne 0x405734
push edi
call fcn.004072d0
mov ecx, dword [esp + 0x20]
push ecx
call fcn.004072d0
add esp, 8
xor eax, eax
mov ecx, dword [esp + 0x64c]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x648
ret 8
mov edi, 4
cmp ebx, ecx
mov dword [esp + 0x10], edi
mov esi, ebx
je 0x405764
push esi
call fcn.004074c2
lea edx, [edi + eax*2 + 8]
mov eax, dword [esp + 0x24]
add esi, 0x804
add esp, 4
cmp esi, eax
mov dword [esp + 0x10], edx
mov edi, edx
jne 0x405743
lea eax, [edi + 0x10]
push eax
call fcn.0040747f
mov esi, eax
add esp, 4
test esi, esi
mov dword [esp + 0x2c], esi
jne 0x40578b
mov ecx, dword [esp + 0x14]
push ecx
call fcn.004072d0
mov edx, dword [esp + 0x20]
push edx
jmp 0x40570f
mov dword [esi], ebp
mov ebp, dword [esp + 0x1c]
mov eax, dword [esp + 0x20]
lea ebx, [esi + 4]
cmp ebp, eax
je 0x4057ea
push ebp
call fcn.004074c2
lea eax, [eax + eax + 8]
mov esi, ebp
mov word [ebx], ax
mov ecx, dword [ebp + 0x800]
movsx eax, ax
add ebx, 2
add ebp, 0x804
add esp, 4
mov dword [ebx], ecx
lea ecx, [eax - 6]
add ebx, 4
mov edx, ecx
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea ebx, [ebx + eax - 6]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
cmp ebp, dword [esp + 0x20]
jne 0x40579c
mov esi, dword [esp + 0x2c]
mov edi, dword [esp + 0x10]
mov ecx, dword [esp + 0x30]
push edi
push esi
call fcn.004050b0
lea eax, [esp + 0x34]
push 0x41552c
push eax
call fcn.004082f4
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x40582f
mov ecx, dword [esp + 0x14]
push ecx
call fcn.004072d0
push esi
call fcn.004072d0
mov edx, dword [esp + 0x24]
push edx
call fcn.004072d0
add esp, 0xc
jmp 0x405717
mov ebp, dword [esp + 0x14]
push ebx
push ebp
push edi
push esi
call fcn.00406f60
push esi
mov edi, eax
call fcn.004072d0
push ebx
call fcn.0040738c
add esp, 0x18
test edi, edi
jne 0x405874
lea eax, [esp + 0x23c]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
lea ecx, [esp + 0x23c]
lea edx, [esp + 0x34]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_MoveFileW]
jmp 0x40587f
lea eax, [esp + 0x34]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push ebp
call fcn.004072d0
mov edx, dword [esp + 0x20]
xor ecx, ecx
test edi, edi
sete cl
push edx
mov esi, ecx
call fcn.004072d0
add esp, 8
mov eax, esi
jmp 0x405719