Function at 0x411020
Capabilities:
Get common file path
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
lea esi, [ebp - 0x620]
push ebx
lea ebx, [ebp - 0x51c]
sub esp, 0x63c
mov dword [esp + 4], esi
mov dword [esp], 0x104
call dword [sym.imp.kernel32.dll_GetTempPathA]
sub esp, 8
mov dword [esp], esi
mov dword [esp + 0xc], ebx
mov dword [esp + 8], 0
mov dword [esp + 4], 0x45b3b9
call dword [sym.imp.kernel32.dll_GetTempFileNameA]
mov eax, dword [sym.imp.msvcrt.dll_fopen]
sub esp, 0x10
mov dword [esp + 4], 0x45af06
mov dword [esp], ebx
mov dword [ebp - 0x630], eax
call eax
mov esi, dword [sym.imp.msvcrt.dll_fputwc]
mov dword [esp], 0x61
mov dword [esp + 4], eax
mov dword [ebp - 0x62c], eax
call esi
mov dword [esp + 4], 0x445
mov dword [esp], 0x45a2c0
movzx edi, ax
call fcn.0044c860
xor eax, eax
cmp edi, 0x61
mov dword [esp + 8], edi
sete al
mov dword [esp + 4], str.fputwc_returned__x__expected_a_n
mov dword [esp], eax
call fcn.0044cad0
mov edx, dword [ebp - 0x62c]
mov dword [esp], 0xa
mov dword [esp + 4], edx
call esi
mov dword [esp + 4], 0x447
mov dword [esp], 0x45a2c0
movzx edi, ax
call fcn.0044c860
xor eax, eax
cmp edi, 0xa
mov dword [esp + 8], edi
sete al
mov dword [esp + 4], str.fputwc_returned__x__expected__n_n
mov dword [esp], eax
call fcn.0044cad0
mov edx, dword [ebp - 0x62c]
mov ecx, dword [sym.imp.msvcrt.dll_fclose]
mov dword [esp], edx
mov dword [ebp - 0x62c], ecx
call ecx
mov dword [esp + 4], 0x45b429
mov eax, dword [ebp - 0x630]
mov dword [esp], ebx
call eax
mov dword [esp + 8], 0x400
mov dword [esp + 0xc], eax
mov edi, eax
lea eax, [ebp - 0x418]
mov dword [esp], eax
mov eax, dword [sym.imp.msvcrt.dll_fread]
mov dword [esp + 4], 1
mov dword [ebp - 0x634], eax
call eax
mov dword [esp + 4], 0x44c
mov dword [esp], 0x45a2c0
mov dword [ebp - 0x638], eax
call fcn.0044c860
mov eax, dword [ebp - 0x638]
mov dword [esp + 4], str.fread_returned__d__expected_3_n
cmp eax, 3
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.0044cad0
mov dword [esp + 4], 0x44d
mov dword [esp], 0x45a2c0
call fcn.0044c860
cmp word [ebp - 0x418], 0xd61
je 0x411510
mov eax, 1
xor eax, 1
mov dword [esp + 4], str.incorrect_file_data_n
mov dword [esp], eax
call fcn.0044cad0
mov dword [esp], edi
mov eax, dword [ebp - 0x62c]
call eax
mov eax, dword [0x46d7ac]
test eax, eax
je 0x411524
mov ecx, dword [ebp - 0x630]
mov dword [esp + 4], str.w_ccsunicode
mov dword [esp], ebx
call ecx
mov dword [esp], 0x61
mov dword [esp + 4], eax
mov dword [ebp - 0x638], eax
call esi
mov dword [esp + 4], 0x453
mov dword [esp], 0x45a2c0
movzx edi, ax
call fcn.0044c860
xor eax, eax
cmp edi, 0x61
mov dword [esp + 8], edi
sete al
mov dword [esp + 4], str.fputwc_returned__x__expected_a_n
mov dword [esp], eax
call fcn.0044cad0
mov edx, dword [ebp - 0x638]
mov dword [esp], 0xa
mov dword [esp + 4], edx
call esi
mov dword [esp + 4], 0x455
mov dword [esp], 0x45a2c0
movzx edi, ax
call fcn.0044c860
xor eax, eax
cmp edi, 0xa
mov dword [esp + 8], edi
sete al
mov dword [esp + 4], str.fputwc_returned__x__expected__n_n
mov dword [esp], eax
call fcn.0044cad0
mov edx, dword [ebp - 0x638]
mov eax, dword [ebp - 0x62c]
mov dword [esp], edx
call eax
mov ecx, dword [ebp - 0x630]
mov dword [esp + 4], 0x45b429
mov dword [esp], ebx
call ecx
mov dword [esp + 8], 0x400
mov dword [esp + 0xc], eax
mov edi, eax
lea eax, [ebp - 0x418]
mov dword [esp], eax
mov eax, dword [ebp - 0x634]
mov dword [esp + 4], 1
call eax
mov dword [esp + 4], 0x45a
mov dword [esp], 0x45a2c0
mov dword [ebp - 0x638], eax
call fcn.0044c860
mov eax, dword [ebp - 0x638]
mov dword [esp + 4], str.fread_returned__d__expected_8_n
cmp eax, 8
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.0044cad0
mov dword [esp + 4], 0x45b
mov dword [esp], 0x45a2c0
call fcn.0044c860
mov eax, dword [0x45ba03]
cmp dword [ebp - 0x418], eax
je 0x4114f0
mov eax, 1
xor eax, 1
mov dword [esp + 4], str.incorrect_file_data_n
mov dword [esp], eax
call fcn.0044cad0
mov dword [esp], edi
mov eax, dword [ebp - 0x62c]
call eax
mov ecx, dword [ebp - 0x630]
mov dword [esp + 4], str.w_ccsutf_8
mov dword [esp], ebx
call ecx
mov dword [esp], 0x61
mov edi, eax
mov dword [esp + 4], eax
call esi
mov dword [esp + 4], 0x460
mov dword [esp], 0x45a2c0
movzx eax, ax
mov dword [ebp - 0x638], eax
call fcn.0044c860
mov eax, dword [ebp - 0x638]
mov dword [esp + 4], str.fputwc_returned__x__expected_a_n
cmp eax, 0x61
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.0044cad0
mov dword [esp + 4], edi
mov dword [esp], 0xa
call esi
mov dword [esp + 4], 0x462
mov dword [esp], 0x45a2c0
movzx esi, ax
call fcn.0044c860
xor eax, eax
cmp esi, 0xa
mov dword [esp + 8], esi
sete al
mov dword [esp + 4], str.fputwc_returned__x__expected__n_n
mov dword [esp], eax
call fcn.0044cad0
mov dword [esp], edi
mov eax, dword [ebp - 0x62c]
call eax
mov ecx, dword [ebp - 0x630]
mov dword [esp + 4], 0x45b429
mov dword [esp], ebx
call ecx
mov dword [esp + 8], 0x400
mov dword [esp + 0xc], eax
mov esi, eax
lea eax, [ebp - 0x418]
mov dword [esp], eax
mov eax, dword [ebp - 0x634]
mov dword [esp + 4], 1
call eax
mov dword [esp + 4], 0x467
mov dword [esp], 0x45a2c0
mov edi, eax
call fcn.0044c860
xor eax, eax
cmp edi, 6
mov dword [esp + 8], edi
sete al
mov dword [esp + 4], str.fread_returned__d__expected_6_n
mov dword [esp], eax
call fcn.0044cad0
mov dword [esp + 4], 0x468
mov dword [esp], 0x45a2c0
call fcn.0044c860
cmp dword [ebp - 0x418], 0x61bfbbef
je 0x4114e0
mov eax, 1
xor eax, 1
mov dword [esp + 4], str.incorrect_file_data_n
mov dword [esp], eax
call fcn.0044cad0
mov dword [esp], esi
mov eax, dword [ebp - 0x62c]
call eax
mov dword [esp], ebx
call dword [sym.imp.msvcrt.dll__unlink]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
xor eax, eax
cmp word [ebp - 0x414], 0xa0d
jne 0x4114a8
jmp 0x4114ad
mov eax, dword [0x45ba07]
cmp dword [ebp - 0x414], eax
jne 0x411348
xor eax, eax
jmp 0x41134d
xor eax, eax
cmp byte [ebp - 0x416], 0xa
jne 0x4111cc
jmp 0x4111d1
mov dword [esp + 4], 0x46b
mov dword [esp], 0x45a2c0
call fcn.0044c860
mov dword [esp], str.fputwc_tests_on_unicode_files_n
call fcn.0044cbe0
jmp 0x4114cb