Function at 0x10028090
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100b4c75
mov eax, dword fs:[0]
push eax
mov eax, 0x8064
call fcn.100b14f0
mov eax, dword [0x10110040]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
push 0x8000
lea eax, [ebp - 0x8010]
xor esi, esi
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea ecx, [ebp - 0x8010]
lea edx, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x100280e0
sub ecx, edx
add ecx, 0xffffffff
je 0x10028109
nop
cmp byte [ebp + ecx - 0x8010], 0x5c
je 0x10028101
sub ecx, 1
jne 0x100280f0
jmp 0x10028109
lea esi, [ebp - 0x800f]
add esi, ecx
push str.quake2.exe
push esi
mov dword [ebp - 0x8034], 0
mov dword [ebp - 0x8030], 0
call fcn.10096f15
add esp, 8
test eax, eax
jne 0x100284ec
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
push 0
push 0x1fffff
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov esi, eax
push str.ref_v1k.dll
mov dword [ebp - 0x806c], esi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push 0xc
lea ecx, [ebp - 0x8064]
push ecx
push eax
push esi
call dword [sym.imp.KERNEL32.dll_K32GetModuleInformation]
mov edi, dword [ebp - 0x8060]
mov eax, dword [ebp - 0x8064]
push edi
mov dword [ebp - 0x8068], eax
mov dword [ebp - 0x8070], edi
call fcn.100899e6
mov esi, eax
add esp, 4
mov dword [ebp - 0x8050], esi
lea eax, [ebp - 0x8034]
mov dword [ebp - 4], 0
push eax
push 0x40
push edi
push dword [ebp - 0x8068]
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x100281c7
push eax
push str.ref_v1k
push str.Couldnt_make_ref_v1k.dll_writable_for_underwater_patching
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
lea eax, [ebp - 0x8030]
push eax
push edi
push esi
push dword [ebp - 0x8068]
push dword [ebp - 0x806c]
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
jne 0x100281f8
push eax
push str.ref_v1k
push str.ReadProcessMemoryFailed_for_ref_v1k.dll._Could_not_patch_underwater_resolutions
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
xorps xmm0, xmm0
mov dword [ebp - 0x8018], 0
xor eax, eax
mov dword [ebp - 0x8014], 7
movups xmmword [ebp - 0x8028], xmm0
mov word [ebp - 0x8028], ax
sub esp, 0x18
mov byte [ebp - 4], 1
mov ecx, esp
mov dword [ebp - 0x802c], esp
lea esi, [ebp - 0x8028]
push 0x19
movups xmmword [ecx], xmm0
push str.Quake2ResolutionUnlocked
mov dword [ecx + 0x10], eax
mov dword [ecx + 0x14], eax
call fcn.10020c50
sub esp, 0x18
mov byte [ebp - 4], 2
mov ecx, esp
push 0x1015f744
call fcn.10028a20
mov ecx, esi
mov byte [ebp - 4], 1
call fcn.1004e7f0
add esp, 0x30
mov edi, esi
cmp dword [ebp - 0x8014], 7
mov esi, dword [ebp - 0x8018]
cmova edi, dword [ebp - 0x8028]
cmp esi, 1
jne 0x100282a8
mov edx, 0x100e5b24
test esi, esi
je 0x100282a4
sub edi, edx
movzx ecx, word [edx + edi]
movzx eax, word [edx]
cmp cx, ax
jne 0x100282a8
add edx, 2
sub esi, 1
jne 0x10028290
mov cl, 1
jmp 0x100282aa
xor cl, cl
mov esi, dword [ebp - 0x8050]
test cl, cl
mov edx, 0x640
lea ecx, [ebp - 0x8028]
mov eax, 0x320
cmovne eax, edx
movzx eax, ax
mov word [esi + 0x1196d], ax
call fcn.10020200
xorps xmm0, xmm0
mov dword [ebp - 0x803c], 0
xor eax, eax
mov dword [ebp - 0x8038], 7
movups xmmword [ebp - 0x804c], xmm0
mov word [ebp - 0x804c], ax
sub esp, 0x18
mov byte [ebp - 4], 3
mov ecx, esp
mov dword [ebp - 0x802c], esp
lea edi, [ebp - 0x804c]
push 0x11
movups xmmword [ecx], xmm0
push 0x100e5b28
mov dword [ecx + 0x10], eax
mov dword [ecx + 0x14], eax
call fcn.10020c50
sub esp, 0x18
mov byte [ebp - 4], 4
mov ecx, esp
push 0x1015f744
call fcn.10028a20
mov ecx, edi
mov byte [ebp - 4], 3
call fcn.1004e7f0
xorps xmm0, xmm0
mov dword [ebp - 0x8014], 0
movq qword [ebp - 0x801c], xmm0
mov dword [ebp - 0x801c], 0
mov dword [ebp - 0x8018], 0
mov dword [ebp - 0x8014], 0
add esp, 0x18
mov byte [ebp - 4], 5
mov ecx, esp
mov dword [ebp - 0x802c], esp
lea edi, [ebp - 0x801c]
push 1
movups xmmword [ecx], xmm0
push 0x100e5b4c
mov dword [ecx + 0x10], 0
mov dword [ecx + 0x14], 0
call fcn.10020c50
sub esp, 0x18
mov byte [ebp - 4], 6
lea eax, [ebp - 0x804c]
mov ecx, esp
push eax
call fcn.10028a20
mov ecx, edi
mov byte [ebp - 4], 5
call fcn.1007ae30
mov eax, dword [ebp - 0x8018]
add esp, 0x30
mov edi, dword [ebp - 0x801c]
sub eax, edi
sub eax, 0x30
cmp eax, 0x18
jb 0x100283ee
mov ecx, 0x140
lea eax, [ecx - 0x78]
jmp 0x1002848f
call fcn.10096ec9
cmp dword [edi + 0x14], 7
mov dword [ebp - 0x8054], eax
jbe 0x10028401
mov edi, dword [edi]
mov dword [eax], 0
lea eax, [ebp - 0x8058]
push 0xa
push eax
push edi
call fcn.10096de6
add esp, 0xc
mov dword [ebp - 0x802c], eax
cmp edi, dword [ebp - 0x8058]
je 0x100288f4
mov eax, dword [ebp - 0x8054]
cmp dword [eax], 0x22
je 0x100288fe
mov edi, dword [ebp - 0x801c]
add edi, 0x18
call fcn.10096ec9
cmp dword [edi + 0x14], 7
mov dword [ebp - 0x8058], eax
jbe 0x10028456
mov edi, dword [edi]
mov dword [eax], 0
lea eax, [ebp - 0x8054]
push 0xa
push eax
push edi
call fcn.10096de6
add esp, 0xc
cmp edi, dword [ebp - 0x8054]
je 0x10028908
mov ecx, dword [ebp - 0x8058]
cmp dword [ecx], 0x22
je 0x10028912
mov ecx, dword [ebp - 0x802c]
mov word [esi + 0x97d6], cx
lea ecx, [ebp - 0x801c]
mov word [esi + 0x97f4], ax
call fcn.10028990
lea ecx, [ebp - 0x804c]
call fcn.10020200
mov edi, dword [ebp - 0x8070]
lea eax, [ebp - 0x8030]
push eax
push edi
push esi
push dword [ebp - 0x8068]
push dword [ebp - 0x806c]
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
jne 0x100288af
push eax
push str.ref_v1k
push str.WriteProcessMemoryFailed_for_ref_v1k.dll._Could_not_update_underwater_resolution.
jmp 0x100288a7
push str.vh2.exe
push esi
call fcn.10096f15
add esp, 8
test eax, eax
jne 0x100288d9
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
push 0
push 0x1fffff
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov esi, eax
lea eax, [ebp - 0x8064]
push 0xc
push eax
push str.vh2.exe
mov dword [ebp - 0x806c], esi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_K32GetModuleInformation]
mov edi, dword [ebp - 0x8060]
mov eax, dword [ebp - 0x8064]
push edi
mov dword [ebp - 0x8068], eax
call fcn.100899e6
mov esi, eax
add esp, 4
mov dword [ebp - 0x802c], esi
lea eax, [ebp - 0x8034]
mov dword [ebp - 4], 7
push eax
push 0x40
push edi
push dword [ebp - 0x8068]
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x10028590
push eax
push 0x100e5bac
push str.Couldnt_make_VH2.exe_DLL_writable_for_underwater_res_patching
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
lea eax, [ebp - 0x8030]
push eax
push edi
push esi
push dword [ebp - 0x8068]
push dword [ebp - 0x806c]
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
jne 0x100285c1
push eax
push 0x100e5bac
push str.ReadProcessMemoryFailed_during_VH2.exe_underwater_res_patching
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
xorps xmm0, xmm0
mov dword [ebp - 0x803c], 0
xor eax, eax
mov dword [ebp - 0x8038], 7
movups xmmword [ebp - 0x804c], xmm0
mov word [ebp - 0x804c], ax
sub esp, 0x18
mov byte [ebp - 4], 8
mov ecx, esp
mov dword [ebp - 0x8070], esp
push 0xe
movups xmmword [ecx], xmm0
push str.VH2Underwater
mov dword [ecx + 0x10], eax
mov dword [ecx + 0x14], eax
call fcn.10020c50
sub esp, 0x18
mov byte [ebp - 4], 9
mov ecx, esp
push 0x1015f744
call fcn.10028a20
lea ecx, [ebp - 0x804c]
mov byte [ebp - 4], 8
call fcn.1004e7f0
xorps xmm0, xmm0
mov dword [ebp - 0x8014], 0
movq qword [ebp - 0x801c], xmm0
mov dword [ebp - 0x801c], 0
mov dword [ebp - 0x8018], 0
mov dword [ebp - 0x8014], 0
add esp, 0x18
mov byte [ebp - 4], 0xa
mov ecx, esp
mov dword [ebp - 0x8070], esp
push 1
movups xmmword [ecx], xmm0
push 0x100e5b4c
mov dword [ecx + 0x10], 0
mov dword [ecx + 0x14], 0
call fcn.10020c50
sub esp, 0x18
mov byte [ebp - 4], 0xb
lea eax, [ebp - 0x804c]
mov ecx, esp
push eax
call fcn.10028a20
lea ecx, [ebp - 0x801c]
mov byte [ebp - 4], 0xa
call fcn.1007ae30
mov eax, dword [ebp - 0x8018]
add esp, 0x30
mov ecx, dword [ebp - 0x801c]
sub eax, ecx
sub eax, 0x30
cmp eax, 0x18
jb 0x100286d4
mov eax, 0x140
lea ecx, [eax - 0x78]
jmp 0x100286f9
push ecx
call fcn.10028920
mov ecx, dword [ebp - 0x801c]
add ecx, 0x18
mov dword [ebp - 0x8070], eax
call fcn.10028920
mov ecx, eax
add esp, 4
mov eax, dword [ebp - 0x8070]
mov word [esi + 0x1fef5], ax
mov word [esi + 0x1feff], cx
lea ecx, [ebp - 0x801c]
call fcn.10028990
lea ecx, [ebp - 0x804c]
call fcn.10020200
xorps xmm0, xmm0
mov dword [ebp - 0x8018], 0
xor eax, eax
mov dword [ebp - 0x8014], 7
movups xmmword [ebp - 0x8028], xmm0
mov word [ebp - 0x8028], ax
sub esp, 0x18
mov byte [ebp - 4], 0xc
mov ecx, esp
mov dword [ebp - 0x8070], esp
push 7
movups xmmword [ecx], xmm0
push str.VH2FPS
mov dword [ecx + 0x10], eax
mov dword [ecx + 0x14], eax
call fcn.10020c50
sub esp, 0x18
mov byte [ebp - 4], 0xd
mov ecx, esp
push 0x1015f744
call fcn.10028a20
lea ecx, [ebp - 0x8028]
mov byte [ebp - 4], 0xc
call fcn.1004e7f0
add esp, 0x30
cmp dword [ebp - 0x8018], 0
jne 0x1002879d
mov eax, 0x48
jmp 0x100287ac
push ecx
lea ecx, [ebp - 0x8028]
call fcn.10028920
add esp, 4
cmp eax, 0x90
mov edx, 0x7c
mov ecx, 0x8c
cmove ecx, edx
mov word [esi + 0x66a6e], cx
lea ecx, [ebp - 0x8028]
call fcn.10020200
xorps xmm0, xmm0
mov dword [ebp - 0x8018], 0
xor eax, eax
mov dword [ebp - 0x8014], 7
movups xmmword [ebp - 0x8028], xmm0
mov word [ebp - 0x8028], ax
sub esp, 0x18
mov byte [ebp - 4], 0xe
mov ecx, esp
mov dword [ebp - 0x8070], esp
push 9
movups xmmword [ecx], xmm0
push str.VH2Audio
mov dword [ecx + 0x10], eax
mov dword [ecx + 0x14], eax
call fcn.10020c50
sub esp, 0x18
mov byte [ebp - 4], 0xf
mov ecx, esp
push 0x1015f744
call fcn.10028a20
lea ecx, [ebp - 0x8028]
mov byte [ebp - 4], 0xe
call fcn.1004e7f0
add esp, 0x30
cmp dword [ebp - 0x8018], 0
jne 0x1002884d
xor eax, eax
jmp 0x1002885c
push ecx
lea ecx, [ebp - 0x8028]
call fcn.10028920
add esp, 4
test eax, eax
mov edx, 0x5622
mov ecx, 0x2b11
cmovne ecx, edx
mov word [esi + 0x3ff13], cx
lea ecx, [ebp - 0x8028]
call fcn.10020200
lea eax, [ebp - 0x8030]
push eax
push edi
push esi
push dword [ebp - 0x8068]
push dword [ebp - 0x806c]
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
jne 0x100288af
push eax
push 0x100e5bac
push str.WriteProcessMemoryFailed__VH2.exe_underwater_res_patching
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
push 0
push dword [ebp - 0x8034]
push edi
push dword [ebp - 0x8068]
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
push dword [ebp - 0x806c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
call fcn.100899e1
add esp, 4
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.10089573
mov esp, ebp
pop ebp
ret
push str.invalid_stoi_argument
call fcn.1008aafe
push str.stoi_argument_out_of_range
call fcn.1008ab3e
push str.invalid_stoi_argument
call fcn.1008aafe
push str.stoi_argument_out_of_range
call fcn.1008ab3e
int3