Function at 0x480f70
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x120
mov eax, dword [0x5f8800]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 8]
lea eax, [ebp - 0xa0]
push 0x32
push 0
push eax
mov ebx, ecx
mov dword [ebp - 0x118], esi
call sub.VCRUNTIME140.dll_memset
push 0x32
lea eax, [ebp - 0x6c]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
push 0x32
lea eax, [ebp - 0x38]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
push dword [esi + 4]
lea eax, [ebp - 0xa0]
push str._quest_d.txt_
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
push 0x5c45dc
lea eax, [ebp - 0x108]
push str.CONTENTS_QUESTS_quests.English.txt
push eax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fopen_s
add esp, 0x3c
test eax, eax
je 0x48100b
push str.Error_opening_file:_CONTENTS_QUESTS_quests.English.txt_n
call fcn.00499390
add esp, 4
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005aa550
mov esp, ebp
pop ebp
ret 8
mov al, byte [ebx + 0x1e]
cmp al, 4
jne 0x481023
mov eax, dword [ebp - 0x108]
mov dword [ebp - 0x10c], eax
jmp 0x481145
movsx eax, al
dec eax
cmp eax, 0x10
ja case.0x48102c.4
jmp dword [eax*4 + 0x4813b4]
mov eax, str.quests.Spanish.txt
jmp 0x48109a
mov eax, str.quests.French.txt
jmp 0x48109a
mov eax, str.quests.German.txt
jmp 0x48109a
mov eax, str.quests.Russian.txt
jmp 0x48109a
mov eax, str.quests.Chinese.txt
jmp 0x48109a
mov eax, str.quests.Portuguese.txt
jmp 0x48109a
mov eax, str.quests.Japanese.txt
jmp 0x48109a
mov eax, str.quests.Korean.txt
jmp 0x48109a
mov eax, str.quests.Italian.txt
jmp 0x48109a
mov eax, str.quests.Malay.txt
jmp 0x48109a
mov eax, str.quests.Polish.txt
jmp 0x48109a
mov eax, str.quests.Dutch.txt
jmp 0x48109a
mov eax, str.quests.Taiwanese.txt
jmp 0x48109a
mov eax, str.quests.Hebrew.txt
jmp 0x48109a
mov eax, str.quests.English.txt
push eax
lea eax, [ebp - 0x104]
push str.CONTENTS_QUESTS__s
push eax
call fcn.00407190
push 0x5c45dc
lea eax, [ebp - 0x104]
push eax
lea eax, [ebp - 0x10c]
push eax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fopen_s
add esp, 0x18
test eax, eax
je 0x48113f
lea eax, [ebp - 0x104]
push eax
push str.Error_opening_file:__s_n
call fcn.00499390
push 0x5c7804
lea eax, [ebp - 0x110]
push str.language.log
push eax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fopen_s
mov eax, dword [ebp - 0x110]
add esp, 0x14
test eax, eax
je 0x48111f
lea ecx, [ebp - 0x104]
push ecx
push str.Error_opening_language_file:__s_n
push eax
call fcn.00499340
push dword [ebp - 0x110]
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fclose
add esp, 0x10
push dword [ebp - 0x108]
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fclose
add esp, 4
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005aa550
mov esp, ebp
pop ebp
ret 8
mov eax, dword [ebp - 0x108]
push edi
push 2
push 0
push eax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fseek
push dword [ebp - 0x108]
call sub.api_ms_win_crt_stdio_l1_1_0.dll_ftell
push dword [ebp - 0x108]
mov edi, eax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_rewind
lea esi, [edi + 1]
push esi
call fcn.005aa4da
push esi
push 0
push eax
mov dword [ebp - 0x110], eax
call sub.VCRUNTIME140.dll_memset
push dword [ebp - 0x108]
push 1
push edi
push dword [ebp - 0x110]
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fread
push 2
push 0
push dword [ebp - 0x10c]
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fseek
add esp, 0x40
push dword [ebp - 0x10c]
call sub.api_ms_win_crt_stdio_l1_1_0.dll_ftell
push dword [ebp - 0x10c]
mov edi, eax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_rewind
lea esi, [edi + 1]
push esi
call fcn.005aa4da
push esi
mov esi, eax
mov dword [ebp - 0x11c], eax
push 0
push esi
call sub.VCRUNTIME140.dll_memset
push dword [ebp - 0x10c]
push 1
push edi
push esi
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fread
lea eax, [ebp - 0xa0]
push eax
push esi
call sub.VCRUNTIME140.dll_strstr
mov edi, eax
add esp, 0x30
test edi, edi
jne 0x481255
lea eax, [ebp - 0xa0]
push eax
push dword [ebp - 0x110]
call sub.VCRUNTIME140.dll_strstr
mov edi, eax
add esp, 8
test edi, edi
jne 0x481255
push dword [ebp - 0x108]
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fclose
push dword [ebp - 0x10c]
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fclose
push dword [ebp - 0x110]
call fcn.005aa4e3
push esi
call fcn.005aa4e3
add esp, 0x10
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005aa550
mov esp, ebp
pop ebp
ret 8
lea eax, [edi + 1]
push str._quest
push eax
call sub.VCRUNTIME140.dll_strstr
add esp, 8
mov dword [ebp - 0x114], eax
test eax, eax
jne 0x481287
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x481275
sub ecx, edx
lea eax, [ecx + esi]
mov dword [ebp - 0x114], eax
mov esi, eax
sub esi, edi
lea eax, [esi + 1]
push eax
call fcn.005aa4da
push esi
mov esi, eax
mov dword [ebp - 0x120], eax
push edi
push esi
call sub.api_ms_win_crt_string_l1_1_0.dll_strncpy
mov eax, dword [ebp - 0x114]
mov ecx, esi
sub ecx, edi
add esp, 0x10
cmp byte [ebp + 0xc], 0
mov byte [ecx + eax], 0
jne 0x4812d8
push str.Start
lea eax, [ebp - 0x38]
push str.__s_
push eax
mov eax, dword [sym.imp.USER32.dll_wsprintfA]
call eax
mov edi, dword [ebp - 0x118]
jmp 0x481305
mov edi, dword [ebp - 0x118]
mov ecx, edi
call fcn.005871a0
test al, al
lea eax, [ebp - 0x38]
jne 0x4812f3
push str.Ongoing
jmp 0x4812f8
push str.Finish
push str.__s_
push eax
mov eax, dword [sym.imp.USER32.dll_wsprintfA]
call eax
add esp, 0xc
lea eax, [ebp - 0x6c]
mov ecx, ebx
push eax
movzx eax, byte [ebx + 0x1e]
push eax
call fcn.0047fb20
lea eax, [ebp - 0x38]
mov ecx, ebx
push eax
lea eax, [ebp - 0x6c]
push eax
push edi
push esi
call fcn.00486d40
test al, al
jne 0x481361
cmp byte [ebx + 0x1e], 4
je 0x481361
push 0x32
lea eax, [ebp - 0x6c]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [ebp - 0x6c]
mov ecx, ebx
push eax
push 4
call fcn.0047fb20
lea eax, [ebp - 0x38]
mov ecx, ebx
push eax
lea eax, [ebp - 0x6c]
push eax
push edi
push esi
call fcn.00486d40
push esi
call fcn.005aa4e3
push dword [ebp - 0x110]
call fcn.005aa4e3
mov eax, dword [ebp - 0x11c]
push eax
call fcn.005aa4e3
push dword [ebp - 0x108]
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fclose
add esp, 0x10
cmp byte [ebx + 0x1e], 4
je 0x4813a0
push dword [ebp - 0x10c]
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fclose
add esp, 4
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.005aa550
mov esp, ebp
pop ebp
ret 8