Function at 0x40a0f0
Capabilities:
Get common file path

Disassembly:
push edi
push esi
sub esp, 0x208
lea esi, [esp + 0x104]
push esi
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
dec eax
cmp eax, 0x103
jae 0x40a145
mov edi, esp
push edi
push 0
push str.fastboot
push esi
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
test eax, eax
je 0x40a156
push str.wbTD
push edi
call sub.msvcrt.dll_fopen
add esp, 8
push eax
call sub.msvcrt.dll__fileno_1
add esp, 0x20c
pop esi
pop edi
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.GetTempPath_failed__error__ld
call fcn.0040dca0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.GetTempFileName_failed__error__ld
call fcn.0040dca0
nop word [eax + eax]
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x20
mov edi, dword [ebp + 8]
cmp byte [edi + 7], 0xff
jne 0x40a30c
cmp byte [edi + 8], 0x42
jne 0x40a30c
cmp byte [edi + 9], 3
jne 0x40a30c
lea ebx, [edi + 0xd]
mov dword [esp + 4], 0
mov dword [esp], 0
mov dword [esp + 8], 0
push ebx
call sub.msvcrt.dll_strlen
add esp, 4
cmp eax, 0xfffffff0
jae 0x40a319
mov ecx, eax
cmp eax, 0xb
jae 0x40a1e1
mov eax, ecx
lea esi, [esp + 1]
add al, cl
test ecx, ecx
mov byte [esp], al
jne 0x40a20e
jmp 0x40a21d
mov dword [esp + 0xc], ebx
mov ebx, ecx
add ebx, 0x10
and ebx, 0xfffffff0
push ebx
mov esi, ecx
call fcn.00493b40
mov ecx, esi
add esp, 4
or ebx, 1
mov dword [esp + 8], eax
mov esi, eax
mov dword [esp], ebx
mov ebx, dword [esp + 0xc]
mov dword [esp + 4], ecx
push ecx
push ebx
push esi
mov ebx, ecx
call sub.msvcrt.dll_memcpy
mov ecx, ebx
add esp, 0xc
mov byte [esi + ecx], 0
cmp byte [edi + 0xc], 0
jne 0x40a27d
lea eax, [esp + 0x10]
push eax
call fcn.00413fe0
add esp, 4
test byte [esp], 1
jne 0x40a242
mov word [esp], 0
jmp 0x40a26a
mov eax, dword [esp + 8]
mov byte [eax], 0
mov dword [esp + 4], 0
test byte [esp], 1
je 0x40a26a
push dword [esp + 8]
call fcn.00493cf0
add esp, 4
mov dword [esp], 0
mov eax, dword [esp + 0x18]
movsd xmm0, qword [esp + 0x10]
mov dword [esp + 8], eax
movsd qword [esp], xmm0
mov cl, byte [esp]
mov eax, dword [esp + 8]
lea esi, [esp + 1]
and cl, 1
mov edx, eax
cmove edx, esi
cmp byte [edx], 0
jne 0x40a2ab
mov ecx, esp
push str.____________
call fcn.004ee530
mov cl, byte [esp]
mov eax, dword [esp + 8]
and cl, 1
test cl, cl
cmove eax, esi
cmp byte [0x53e05e], 0
je 0x40a2e2
push eax
push str.__22s_fastboot
call fcn.004d1760
add esp, 8
add edi, 0x10d
push edi
call sub.msvcrt.dll_strlen
add esp, 4
test eax, eax
je 0x40a2f0
push edi
push 0x51be75
jmp 0x40a2e8
push eax
push str._s_tfastboot
call fcn.004d1760
add esp, 8
push 0xa
call sub.msvcrt.dll_putchar
add esp, 4
test byte [esp], 1
je 0x40a30c
push dword [esp + 8]
call fcn.00493cf0
add esp, 4
mov eax, 0xffffffff
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
mov ecx, esp
call fcn.004d7ad0
push ebx
push edi
push esi
mov edi, dword [esp + 0x10]
mov esi, 0xffffffff
cmp byte [edi + 7], 0xff
jne 0x40a36f
cmp byte [edi + 8], 0x42
jne 0x40a36f
cmp byte [edi + 9], 3
jne 0x40a36f
mov ebx, dword [0x53e058]
test ebx, ebx
je 0x40a36d
lea eax, [edi + 0xd]
push eax
push ebx
call sub.msvcrt.dll_strcmp
add esp, 8
test eax, eax
je 0x40a36d
add edi, 0x10d
push edi
push ebx
call sub.msvcrt.dll_strcmp
add esp, 8
test eax, eax
jne 0x40a36f
xor esi, esi
mov eax, esi
pop esi
pop edi
pop ebx
ret