Function at 0x40b220
Capabilities:
Get common file path

Disassembly:
push edi
push esi
sub esp, 0x208
lea esi, [esp + 0x104]
push 0x104
push 0
push esi
call sub.api_ms_win_crt_string_l1_1_0.dll_memset
add esp, 0xc
push esi
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
add eax, 0xfffffefc
cmp eax, 0xfffffefc
jbe 0x40b299
mov edi, esp
push 0x104
push 0
push edi
call sub.api_ms_win_crt_string_l1_1_0.dll_memset
add esp, 0xc
push edi
push 0
push str.fastboot
push esi
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
test eax, eax
je 0x40b2aa
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_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.00424010
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.GetTempFileName_failed__error__ld
call fcn.00424010
nop dword [eax + eax]
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x30
mov edi, dword [ebp + 8]
cmp byte [edi + 7], 0xff
jne 0x40b53d
cmp byte [edi + 8], 0x42
jne 0x40b53d
cmp byte [edi + 9], 3
jne 0x40b53d
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 0x40b54a
mov ecx, eax
cmp eax, 0xb
jae 0x40b331
mov eax, ecx
add al, cl
mov byte [esp], al
lea esi, [esp + 1]
test ecx, ecx
jne 0x40b35e
jmp 0x40b36d
mov dword [esp + 0x1c], ebx
mov ebx, ecx
add ebx, 0x10
and ebx, 0xfffffff0
push ebx
mov esi, ecx
call fcn.0041a1e0
mov ecx, esi
add esp, 4
mov esi, eax
mov dword [esp + 8], eax
or ebx, 1
mov dword [esp], ebx
mov ebx, dword [esp + 0x1c]
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
lea ebx, [edi + 0x20d]
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0x18], 0
push ebx
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
add esp, 4
cmp eax, 0xfffffff0
jae 0x40b551
mov ecx, eax
cmp eax, 0xb
jae 0x40b3ba
mov eax, ecx
add al, cl
mov byte [esp + 0x10], al
lea esi, [esp + 0x11]
test ecx, ecx
jne 0x40b3e8
jmp 0x40b3f7
mov dword [esp + 0x1c], ebx
mov ebx, ecx
add ebx, 0x10
and ebx, 0xfffffff0
push ebx
mov esi, ecx
call fcn.0041a1e0
mov ecx, esi
add esp, 4
mov esi, eax
mov dword [esp + 0x18], eax
or ebx, 1
mov dword [esp + 0x10], ebx
mov ebx, dword [esp + 0x1c]
mov dword [esp + 0x14], 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
movzx eax, byte [esp + 0x10]
test al, 1
je 0x40b40e
mov eax, dword [esp + 0x14]
test eax, eax
jne 0x40b422
jmp 0x40b414
shr eax, 1
test eax, eax
jne 0x40b422
lea ecx, [esp + 0x10]
push str.fastboot
call fcn.0041e510
cmp byte [edi + 0xc], 0
jne 0x40b46f
lea eax, [esp + 0x20]
push eax
call fcn.0048d910
add esp, 4
test byte [esp], 1
je 0x40b45c
mov eax, dword [esp + 8]
mov byte [eax], 0
mov dword [esp + 4], 0
test byte [esp], 1
je 0x40b45c
push dword [esp + 8]
call fcn.0041a380
add esp, 4
mov eax, dword [esp + 0x28]
mov dword [esp + 8], eax
movsd xmm0, qword [esp + 0x20]
movsd qword [esp], xmm0
test byte [esp], 1
lea esi, [esp + 1]
mov eax, esi
jne 0x40b4ab
cmp byte [eax], 0
je 0x40b4b4
test byte [esp], 1
jne 0x40b4c6
test byte [esp + 0x10], 1
je 0x40b4d1
mov eax, dword [esp + 0x18]
cmp byte [0x58654e], 0
jne 0x40b4de
push eax
push esi
push str._s_t_s
call fcn.0040efb0
add esp, 0xc
jmp 0x40b50e
mov eax, dword [esp + 8]
cmp byte [eax], 0
jne 0x40b480
mov ecx, esp
push str.____________
call fcn.0041e510
test byte [esp], 1
je 0x40b486
mov esi, dword [esp + 8]
test byte [esp + 0x10], 1
jne 0x40b48d
lea eax, [esp + 0x11]
cmp byte [0x58654e], 0
je 0x40b49a
push eax
push esi
push str.__22s__s
call fcn.0040efb0
add esp, 0xc
add edi, 0x10d
push edi
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
add esp, 4
test eax, eax
je 0x40b50e
push edi
push 0x55d55d
call fcn.0040efb0
add esp, 8
push 0xa
call sub.api_ms_win_crt_stdio_l1_1_0.dll_putchar
add esp, 4
test byte [esp + 0x10], 1
je 0x40b52b
push dword [esp + 0x18]
call fcn.0041a380
add esp, 4
test byte [esp], 1
je 0x40b53d
push dword [esp + 8]
call fcn.0041a380
add esp, 4
mov eax, 0xffffffff
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
mov ecx, esp
call fcn.0041d590
lea ecx, [esp + 0x10]
call fcn.0041d590
nop word [eax + eax]
push ebx
push edi
push esi
mov edi, dword [esp + 0x10]
mov esi, 0xffffffff
cmp byte [edi + 7], 0xff
jne 0x40b5af
cmp byte [edi + 8], 0x42
jne 0x40b5af
cmp byte [edi + 9], 3
jne 0x40b5af
mov ebx, dword [0x586548]
test ebx, ebx
je 0x40b5ad
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 0x40b5ad
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 0x40b5af
xor esi, esi
mov eax, esi
pop esi
pop edi
pop ebx
ret