Function at 0x10020170
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x2074
call fcn.100cde60
push ebx
push esi
mov esi, dword [ebp + 0x10]
lea eax, [esp + 0x18]
push edi
push 0xa
push eax
mov dword [esp + 0x44], 0
push esi
mov byte [esp + 0x1c], 0xff
mov dword [esp + 0x28], 0
call dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_strtol]
mov ecx, dword [esp + 0x28]
add esp, 0xc
cmp ecx, esi
jbe 0x100201ba
mov byte [esp + 0x10], al
mov esi, ecx
cmp byte [esi], 0x20
jne 0x100201c6
nop
inc esi
cmp byte [esi], 0x20
je 0x100201c0
push 0x80
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_SetPriorityClass]
sub esp, 8
lea ecx, [esp + 0x6c]
call fcn.1001fff0
mov ecx, esi
mov dword [esp + 0x5c], 0
mov dword [esp + 0x60], 0xf
mov byte [esp + 0x4c], 0
lea edx, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10020200
sub ecx, edx
push ecx
push esi
lea ecx, [esp + 0x54]
call fcn.1001d4d0
mov eax, dword [esp + 0x5c]
cmp eax, 4
jb 0x10020343
lea ecx, [eax - 3]
cmp eax, ecx
jb 0x10020a51
sub eax, ecx
mov edx, 3
cmp eax, edx
push 3
cmovb edx, eax
lea eax, [esp + 0x50]
cmp dword [esp + 0x64], 0x10
push 0x10175754
cmovae eax, dword [esp + 0x54]
add ecx, eax
call fcn.10021da0
add esp, 8
test eax, eax
jne 0x10020343
push 0x80
call fcn.100cd0b0
add esp, 4
mov ebx, eax
mov dword [esp + 0x44], ebx
push 0x101995c8
push esi
mov dword [ebx], 0x101996c0
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen]
add esp, 8
mov dword [ebx + 8], eax
test eax, eax
je 0x10020a56
push 0x58
lea edi, [ebx + 0x10]
mov dword [ebx + 4], 0
push 0
push edi
mov dword [ebx], 0x101996b4
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov ecx, edi
call fcn.10147230
mov esi, eax
test esi, esi
jne 0x10020ac3
push eax
push eax
push 0xffffffffffffffff
push dword [edi + 0x20]
push dword [edi + 0x24]
call fcn.10147930
mov esi, eax
add esp, 0x14
test esi, esi
jne 0x10020a87
mov eax, dword [edi + 0x24]
mov esi, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll__aligned_malloc]
push 0x20
push 0x100000
mov byte [eax + 0x38], 1
mov eax, dword [edi + 0x24]
mov byte [eax + 0x3b], 1
mov dword [ebx + 0x68], 0x100000
call esi
push 0x20
push 0x200
mov dword [ebx + 0x6c], eax
call esi
mov dword [edi], eax
xor esi, esi
mov dword [ebx + 0x70], eax
add esp, 0x10
mov eax, dword [ebx + 0x68]
xor edi, edi
mov dword [ebx + 0x24], eax
xor ecx, ecx
mov eax, dword [ebx + 0x6c]
mov dword [ebx + 0x20], eax
lea eax, [esi + 7]
mov dword [ebx + 0x74], 0
mov dword [ebx + 0x78], 0
mov dword [ebx + 0x14], 0
jmp 0x100203d0
push 0x20
call fcn.100cd0b0
add esp, 4
mov dword [esp + 0x44], eax
mov ebx, eax
push 0x101995c8
push esi
mov dword [ebx], 0x101996c0
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen]
add esp, 8
mov dword [ebx + 8], eax
test eax, eax
je 0x10020af4
mov eax, 0x18
mov dword [ebx + 4], 0
xor esi, esi
mov dword [ebx], 0x101996a8
xor edi, edi
mov dword [ebx + 0xc], 0
and eax, 0xffffffef
mov dword [ebx + 0x10], 0
xor ecx, ecx
mov dword [ebx + 0x14], 0
mov dword [ebx + 0x18], 0
mov dword [ebx + 0x1c], 0
mov dword [esp + 0x14], eax
test al, 8
je 0x100203c0
and eax, 0xfffffff7
mov dword [esp + 0x14], eax
mov edi, dword [esp + 0x10]
mov esi, dword [esp + 0x10]
test al, 4
je 0x100203e6
mov ecx, dword [esp + 0x3c]
and eax, 0xfffffffb
mov dword [esp + 0x14], eax
test ecx, ecx
je 0x100203e6
mov eax, dword [ecx]
push 1
call dword [eax + 8]
mov eax, dword [esp + 0x14]
test al, 2
je 0x10020402
and eax, 0xfffffffd
mov dword [esp + 0x14], eax
test edi, edi
je 0x10020402
mov eax, dword [edi]
mov ecx, edi
push 1
call dword [eax + 8]
mov eax, dword [esp + 0x14]
test al, 1
je 0x10020413
test esi, esi
je 0x10020413
mov eax, dword [esi]
mov ecx, esi
push 1
call dword [eax + 8]
call sym.GSdx32_SSE2.dll_GSinit
lea eax, [esp + 0x80]
mov dword [0x107642b4], eax
mov eax, dword [0x10761d5c]
test eax, eax
je 0x1002043a
lea ecx, [esp + 0x80]
mov dword [eax + 0xa44], ecx
push str.vsync
mov ecx, 0x10761d60
call fcn.1005c680
push ecx
push dword [esp + 0x14]
mov edx, 0x10196e04
mov dword [0x107642b8], eax
lea ecx, [esp + 0x28]
mov dword [esp + 0x28], 0
call fcn.1001e240
mov eax, dword [ebx]
lea ecx, [esp + 0x50]
add esp, 8
push 4
push ecx
mov ecx, ebx
call dword [eax + 4]
mov ecx, dword [0x10761d5c]
push 0
push dword [esp + 0x4c]
mov eax, dword [ecx]
call dword [eax + 0x18]
mov eax, dword [ebx]
lea ecx, [esp + 0x3c]
push 4
push ecx
mov ecx, ebx
call dword [eax + 4]
mov edi, dword [esp + 0x3c]
xor eax, eax
xor esi, esi
mov dword [esp + 0x10], eax
test edi, edi
je 0x10020502
cmp edi, 0x7fffffff
ja 0x10020b25
cmp edi, 0x1000
jb 0x100204e0
lea eax, [edi + 0x23]
cmp eax, edi
jbe 0x10020b2a
push eax
call fcn.100cd0b0
add esp, 4
test eax, eax
je 0x1002053f
lea esi, [eax + 0x23]
and esi, 0xffffffe0
mov dword [esi - 4], eax
jmp 0x100204eb
push edi
call fcn.100cd0b0
add esp, 4
mov esi, eax
push edi
lea eax, [esi + edi]
push 0
push esi
mov dword [esp + 0x1c], eax
call sub.VCRUNTIME140.dll_memset
mov edi, dword [esp + 0x48]
add esp, 0xc
mov dword [esp + 0x40], esi
mov ecx, ebx
mov eax, dword [ebx]
push edi
push esi
call dword [eax + 4]
lea eax, [esp + 0x3c]
push eax
push 0
call sym.GSdx32_SSE2.dll_GSfreeze
test esi, esi
je 0x1002054f
mov ecx, dword [esp + 0x10]
mov eax, esi
sub ecx, esi
cmp ecx, 0x1000
jb 0x10020545
mov esi, dword [esi - 4]
add ecx, 0x23
sub eax, esi
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x10020545
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push esi
call fcn.100cd0a2
add esp, 8
mov eax, dword [ebx]
lea ecx, [esp + 0x80]
push 0x2000
push ecx
mov ecx, ebx
call dword [eax + 4]
push 1
call sym.GSdx32_SSE2.dll_GSvsync
xor esi, esi
push 0x20
mov dword [esp + 0x18], esi
call fcn.100cd0b0
mov edi, eax
add esp, 4
lea eax, [esp + 0x1b]
mov dword [esp + 0x3c], edi
mov ecx, ebx
mov dword [edi], edi
mov dword [edi + 4], edi
mov edx, dword [ebx]
push 1
push eax
mov edx, dword [edx + 4]
call edx
test al, al
je 0x1002075c
nop dword [eax]
mov al, byte [esp + 0x1b]
mov byte [esp + 0x24], al
movzx eax, al
mov dword [esp + 0x30], 0
mov dword [esp + 0x34], 0
mov dword [esp + 0x38], 0
cmp eax, 3
ja case.default.0x100205cc
jmp dword [eax*4 + 0x10020b30]
mov eax, dword [ebx]
lea ecx, [esp + 0x25]
push 1
push ecx
mov ecx, ebx
call dword [eax + 4]
mov eax, dword [ebx]
lea ecx, [esp + 0x28]
push 4
push ecx
mov ecx, ebx
call dword [eax + 4]
mov al, byte [esp + 0x25]
test al, al
je 0x10020617
dec al
cmp al, 2
ja case.default.0x100205cc
push dword [esp + 0x28]
lea ecx, [esp + 0x34]
call fcn.100211c0
push dword [esp + 0x28]
jmp 0x100206c1
mov eax, dword [esp + 0x34]
mov edx, eax
mov ecx, dword [esp + 0x30]
sub edx, ecx
mov dword [esp + 0x10], eax
cmp edx, 0x4000
jbe 0x10020637
lea eax, [ecx + 0x4000]
jmp 0x10020677
jae 0x1002067b
mov eax, dword [esp + 0x38]
sub eax, ecx
cmp eax, 0x4000
jae 0x10020657
push ecx
push 0x4000
lea ecx, [esp + 0x38]
call fcn.10021a10
jmp 0x1002067b
mov esi, 0x4000
sub esi, edx
push esi
push 0
push dword [esp + 0x18]
call sub.VCRUNTIME140.dll_memset
mov eax, dword [esp + 0x1c]
add esp, 0xc
add eax, esi
mov esi, dword [esp + 0x14]
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x28]
mov ecx, 0x4000
sub ecx, eax
push eax
mov eax, dword [esp + 0x34]
mov dword [esp + 0x30], ecx
add eax, ecx
mov edx, dword [ebx]
mov ecx, ebx
push eax
call dword [edx + 4]
jmp case.default.0x100205cc
push 1
lea ecx, [esp + 0x29]
push ecx
jmp 0x100206c5
push 4
lea ecx, [esp + 0x2c]
push ecx
jmp 0x100206c5
push ecx
push 0x2000
lea ecx, [esp + 0x38]
call fcn.10021a10
push 0x2000
push dword [esp + 0x34]
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax + 4]
cmp esi, 0x7ffffff
je 0x10020751
push 0x20
call fcn.100cd0b0
mov esi, eax
add esp, 4
lea eax, [esp + 0x24]
push eax
lea ecx, [esi + 8]
call 0x10020b60
mov ecx, dword [edi + 4]
inc dword [esp + 0x14]
mov dword [esi], edi
mov dword [esi + 4], ecx
mov dword [edi + 4], esi
mov dword [ecx], esi
mov ecx, dword [esp + 0x30]
test ecx, ecx
je 0x10020734
mov edx, dword [esp + 0x38]
mov eax, ecx
sub edx, ecx
cmp edx, 0x1000
jb 0x1002072a
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x1002053f
push edx
push ecx
call fcn.100cd0a2
add esp, 8
mov eax, dword [ebx]
lea ecx, [esp + 0x1b]
push 1
push ecx
mov ecx, ebx
mov eax, dword [eax + 4]
call eax
test al, al
je 0x1002075c
mov esi, dword [esp + 0x14]
jmp 0x100205a0
push str.list_too_long
call dword [sym.imp.MSVCP140.dll_void___cdecl_std::_Xlength_error_char_const__]
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
push dword [esp + 0x20]
xor esi, esi
xor eax, eax
mov dword [esp + 0x18], esi
mov dword [esp + 0x28], esi
mov dword [esp + 0x2c], esi
mov dword [esp + 0x20], eax
mov dword [esp + 0x30], eax
call dword [sym.imp.USER32.dll_IsWindowVisible]
test eax, eax
je 0x100208d3
mov ebx, esi
mov esi, dword [edi]
cmp esi, edi
je 0x100208b9
nop word [eax + eax]
movzx eax, byte [esi + 8]
cmp eax, 3
ja case.default.0x100207c1
jmp dword [eax*4 + 0x10020b40]
movzx eax, byte [esi + 9]
cmp eax, 3
ja case.default.0x100207c1
jmp dword [eax*4 + 0x10020b50]
push dword [esi + 0x10]
push dword [esi + 0x14]
call sym.GSdx32_SSE2.dll_GSgifTransfer1
jmp case.default.0x100207c1
mov eax, dword [esi + 0xc]
shr eax, 4
push eax
push dword [esi + 0x14]
call sym.GSdx32_SSE2.dll_GSgifTransfer2
jmp case.default.0x100207c1
mov eax, dword [esi + 0xc]
shr eax, 4
push eax
push dword [esi + 0x14]
call sym.GSdx32_SSE2.dll_GSgifTransfer3
jmp case.default.0x100207c1
mov eax, dword [esi + 0xc]
shr eax, 4
push eax
push dword [esi + 0x14]
call sym.GSdx32_SSE2.dll_GSgifTransfer
jmp case.default.0x100207c1
movzx eax, byte [esi + 9]
push eax
call sym.GSdx32_SSE2.dll_GSvsync
jmp case.default.0x100207c1
mov ecx, dword [esi + 0xc]
mov edx, ebx
sub edx, dword [esp + 0x14]
cmp edx, ecx
jae 0x10020886
mov eax, dword [esp + 0x1c]
sub eax, dword [esp + 0x14]
cmp ecx, eax
jbe 0x1002086c
push ecx
push ecx
lea ecx, [esp + 0x2c]
call fcn.10021a10
mov eax, dword [esp + 0x2c]
mov ebx, dword [esp + 0x28]
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x24]
mov dword [esp + 0x14], eax
mov eax, dword [esi + 0xc]
shr eax, 4
push eax
push dword [esi + 0x14]
call sym.GSdx32_SSE2.dll_GSreadFIFO2
jmp case.default.0x100207c1
sub ecx, edx
push ecx
push 0
push ebx
mov dword [esp + 0x1c], ecx
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
add ebx, dword [esp + 0x10]
mov dword [esp + 0x28], ebx
mov eax, dword [esi + 0xc]
shr eax, 4
push eax
push dword [esi + 0x14]
call sym.GSdx32_SSE2.dll_GSreadFIFO2
jmp case.default.0x100207c1
push 0x2000
push dword [esi + 0x14]
lea eax, [esp + 0x88]
push eax
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
mov esi, dword [esi]
cmp esi, edi
jne 0x100207a0
push dword [esp + 0x20]
call dword [sym.imp.USER32.dll_IsWindowVisible]
test eax, eax
jne 0x10020790
mov ebx, dword [esp + 0x44]
mov esi, dword [esp + 0x14]
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
mov ecx, dword [0x10761d5c]
mov byte [0x101b8beb], 0
test ecx, ecx
je 0x10020930
mov eax, dword [ecx]
call dword [eax + 0x28]
mov ecx, dword [0x10761d5c]
mov edx, dword [ecx + 0x325c]
test edx, edx
je 0x1002090f
mov eax, dword [edx]
mov ecx, edx
push 1
call dword [eax]
mov ecx, dword [0x10761d5c]
mov edx, dword [ecx + 0x3254]
mov dword [ecx + 0x325c], 0
test edx, edx
je 0x10020930
mov eax, dword [edx]
mov ecx, edx
call dword [eax + 0xc]
mov ecx, dword [0x10761d5c]
mov byte [0x101b8beb], 0
test ecx, ecx
je 0x10020941
mov eax, dword [ecx]
push 1
call dword [eax]
cmp dword [0x101b1720], 0
mov dword [0x10761d5c], 0
mov byte [0x10761da0], 0xff
jl 0x1002096b
call dword [sym.imp.ole32.dll_CoUninitialize]
mov dword [0x101b1720], 0x80004005
mov eax, dword [0x101b8c04]
mov dword [0x101b8c00], 0
test eax, eax
je 0x10020985
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov dword [0x101b8c04], 0
test esi, esi
je 0x100209bd
mov ecx, dword [esp + 0x1c]
mov eax, esi
sub ecx, esi
cmp ecx, 0x1000
jb 0x100209b3
mov esi, dword [esi - 4]
add ecx, 0x23
sub eax, esi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10020a2f
push ecx
push esi
call fcn.100cd0a2
add esp, 8
mov eax, dword [edi + 4]
mov dword [eax], 0
mov eax, dword [edi]
mov dword [esp + 0x10], eax
test eax, eax
je 0x100209f1
mov edi, eax
mov esi, dword [edi]
lea ecx, [edi + 0x14]
call fcn.10021320
push 0x20
push edi
call fcn.100cd0a2
add esp, 8
mov edi, esi
test esi, esi
jne 0x100209d2
mov edi, dword [esp + 0x3c]
push 0x20
push edi
call fcn.100cd0a2
mov eax, dword [ebx]
add esp, 8
mov ecx, ebx
push 1
call dword [eax + 8]
mov eax, dword [esp + 0x60]
cmp eax, 0x10
jb 0x10020a3f
mov edx, dword [esp + 0x4c]
lea ecx, [eax + 1]
mov eax, edx
cmp ecx, 0x1000
jb 0x10020a35
mov edx, dword [edx - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x10020a35
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.100cd0a2
add esp, 8
lea ecx, [esp + 0x64]
call fcn.10020110
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
call fcn.10021e20
push esi
push str.failed_to_open__s_n
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.1001d650
add esp, 0xc
mov dword [esp + 0x1c], 0x101995e0
lea eax, [esp + 0x1c]
push 0x101aacdc
push eax
call sub.VCRUNTIME140.dll__CxxThrowException
mov ecx, dword [edi + 0x24]
test ecx, ecx
je 0x10020ac3
mov edx, dword [edi + 0x20]
call fcn.10147330
mov eax, dword [edi + 0x20]
mov edx, dword [edi + 0x24]
test eax, eax
je 0x10020ab2
mov ecx, dword [eax + 4]
test ecx, ecx
je 0x10020ab2
push edx
push dword [eax + 8]
call ecx
add esp, 8
jmp 0x10020abc
push edx
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
mov dword [edi + 0x24], 0
push esi
push str.Error_initializing_the_decoder___error_code__u__n
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.1001d650
add esp, 0xc
mov dword [esp + 0x20], 0x101995e0
lea eax, [esp + 0x20]
push 0x101aacdc
push eax
call sub.VCRUNTIME140.dll__CxxThrowException
push esi
push str.failed_to_open__s_n
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.1001d650
add esp, 0xc
mov dword [esp + 0x10], 0x101995e0
lea eax, [esp + 0x10]
push 0x101aacdc
push eax
call sub.VCRUNTIME140.dll__CxxThrowException
call fcn.10021850
call fcn.1001d420
nop
rol dword [0x69b1002], cl
add dl, byte [eax]
movsb byte es:[edi], byte [esi]
push es
add dl, byte [eax]
lodsd eax, dword [esi]
push es
add dl, byte [eax]
mov ah, 7
add dl, byte [eax]
adc al, 8
add dl, byte [eax]
and ecx, dword [eax]
add dl, byte [eax]
xchg edi, eax
or byte [edx], al
adc al, cl
pop es
add dl, byte [eax]
fadd dword [edi]
add dl, byte [eax]
in al, dx
pop es
add dl, byte [eax]
add byte [eax], cl
add dl, byte [eax]
mov edx, dword [esp + 4]
movzx eax, byte [edx]
mov byte [ecx], al
movzx eax, byte [edx + 1]
mov byte [ecx + 1], al
mov eax, dword [edx + 4]
mov dword [ecx + 4], eax
mov eax, dword [edx + 8]
mov dword [ecx + 8], eax
mov dword [ecx + 0xc], 0
mov dword [ecx + 0x10], 0
mov dword [ecx + 0x14], 0
mov eax, dword [edx + 0xc]
mov dword [ecx + 0xc], eax
mov eax, dword [edx + 0x10]
mov dword [ecx + 0x10], eax
mov eax, dword [edx + 0x14]
mov dword [ecx + 0x14], eax
mov eax, ecx
mov dword [edx + 0xc], 0
mov dword [edx + 0x10], 0
mov dword [edx + 0x14], 0
ret 4