Function at 0x40a1f0
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 0x40a245
mov edi, esp
push edi
push 0
push str.fastboot
push esi
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
test eax, eax
je 0x40a256
push str.wbTD
push edi
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fopen
add esp, 8
push eax
call sub.api_ms_win_crt_stdio_l1_1_0.dll__fileno
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.00422910
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.GetTempFileName_failed__error__ld
call fcn.00422910
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 0x40a40c
cmp byte [edi + 8], 0x42
jne 0x40a40c
cmp byte [edi + 9], 3
jne 0x40a40c
lea ebx, [edi + 0xd]
mov dword [esp + 4], 0
mov dword [esp], 0
mov dword [esp + 8], 0
push ebx
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
add esp, 4
cmp eax, 0xfffffff0
jae 0x40a419
mov ecx, eax
cmp eax, 0xb
jae 0x40a2e1
mov eax, ecx
lea esi, [esp + 1]
add al, cl
test ecx, ecx
mov byte [esp], al
jne 0x40a30e
jmp 0x40a31d
mov dword [esp + 0xc], ebx
mov ebx, ecx
add ebx, 0x10
and ebx, 0xfffffff0
push ebx
mov esi, ecx
call fcn.00416880
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.api_ms_win_crt_private_l1_1_0.dll_memcpy
mov ecx, ebx
add esp, 0xc
mov byte [esi + ecx], 0
cmp byte [edi + 0xc], 0
jne 0x40a37d
lea eax, [esp + 0x10]
push eax
call fcn.00472d30
add esp, 4
test byte [esp], 1
jne 0x40a342
mov word [esp], 0
jmp 0x40a36a
mov eax, dword [esp + 8]
mov byte [eax], 0
mov dword [esp + 4], 0
test byte [esp], 1
je 0x40a36a
push dword [esp + 8]
call fcn.00416a20
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 0x40a3ab
mov ecx, esp
push str.____________
call fcn.0041cf50
mov cl, byte [esp]
mov eax, dword [esp + 8]
and cl, 1
test cl, cl
cmove eax, esi
cmp byte [0x5364de], 0
je 0x40a3e2
push eax
push str.__22s_fastboot
call fcn.0040c320
add esp, 8
add edi, 0x10d
push edi
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
add esp, 4
test eax, eax
je 0x40a3f0
push edi
push 0x50df3f
jmp 0x40a3e8
push eax
push str._s_tfastboot
call fcn.0040c320
add esp, 8
push 0xa
call sub.api_ms_win_crt_stdio_l1_1_0.dll_putchar
add esp, 4
test byte [esp], 1
je 0x40a40c
push dword [esp + 8]
call fcn.00416a20
add esp, 4
mov eax, 0xffffffff
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
mov ecx, esp
call fcn.0041bfb0
push ebx
push edi
push esi
mov edi, dword [esp + 0x10]
mov esi, 0xffffffff
cmp byte [edi + 7], 0xff
jne 0x40a46f
cmp byte [edi + 8], 0x42
jne 0x40a46f
cmp byte [edi + 9], 3
jne 0x40a46f
mov ebx, dword [0x5364d8]
test ebx, ebx
je 0x40a46d
lea eax, [edi + 0xd]
push eax
push ebx
call sub.api_ms_win_crt_string_l1_1_0.dll_strcmp
add esp, 8
test eax, eax
je 0x40a46d
add edi, 0x10d
push edi
push ebx
call sub.api_ms_win_crt_string_l1_1_0.dll_strcmp
add esp, 8
test eax, eax
jne 0x40a46f
xor esi, esi
mov eax, esi
pop esi
pop edi
pop ebx
ret