Function at 0x100270c0
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100a7e85
mov eax, dword fs:[0]
push eax
mov eax, 0x8064
call fcn.100a46b0
mov eax, dword [0x10102040]
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 0x10027110
sub ecx, edx
add ecx, 0xffffffff
je 0x10027139
nop
cmp byte [ebp + ecx - 0x8010], 0x5c
je 0x10027131
sub ecx, 1
jne 0x10027120
jmp 0x10027139
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.1008a0d5
add esp, 8
test eax, eax
jne 0x1002751c
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.1007cf1a
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 0x100271f7
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 0x10027228
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.10020190
sub esp, 0x18
mov byte [ebp - 4], 2
mov ecx, esp
push 0x101515bc
call fcn.10027a60
mov ecx, esi
mov byte [ebp - 4], 1
call fcn.10046cb0
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 0x100272d8
mov edx, 0x100d89f4
test esi, esi
je 0x100272d4
sub edi, edx
movzx ecx, word [edx + edi]
movzx eax, word [edx]
cmp cx, ax
jne 0x100272d8
add edx, 2
sub esi, 1
jne 0x100272c0
mov cl, 1
jmp 0x100272da
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.1001f760
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 0x100d89f8
mov dword [ecx + 0x10], eax
mov dword [ecx + 0x14], eax
call fcn.10020190
sub esp, 0x18
mov byte [ebp - 4], 4
mov ecx, esp
push 0x101515bc
call fcn.10027a60
mov ecx, edi
mov byte [ebp - 4], 3
call fcn.10046cb0
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 0x100d8a1c
mov dword [ecx + 0x10], 0
mov dword [ecx + 0x14], 0
call fcn.10020190
sub esp, 0x18
mov byte [ebp - 4], 6
lea eax, [ebp - 0x804c]
mov ecx, esp
push eax
call fcn.10027a60
mov ecx, edi
mov byte [ebp - 4], 5
call fcn.1006d920
mov eax, dword [ebp - 0x8018]
add esp, 0x30
mov edi, dword [ebp - 0x801c]
sub eax, edi
sub eax, 0x30
cmp eax, 0x18
jb 0x1002741e
mov ecx, 0x140
lea eax, [ecx - 0x78]
jmp 0x100274bf
call fcn.1008a089
cmp dword [edi + 0x14], 7
mov dword [ebp - 0x8054], eax
jbe 0x10027431
mov edi, dword [edi]
mov dword [eax], 0
lea eax, [ebp - 0x8058]
push 0xa
push eax
push edi
call fcn.10089fa6
add esp, 0xc
mov dword [ebp - 0x802c], eax
cmp edi, dword [ebp - 0x8058]
je 0x10027936
mov eax, dword [ebp - 0x8054]
cmp dword [eax], 0x22
je 0x10027940
mov edi, dword [ebp - 0x801c]
add edi, 0x18
call fcn.1008a089
cmp dword [edi + 0x14], 7
mov dword [ebp - 0x8058], eax
jbe 0x10027486
mov edi, dword [edi]
mov dword [eax], 0
lea eax, [ebp - 0x8054]
push 0xa
push eax
push edi
call fcn.10089fa6
add esp, 0xc
cmp edi, dword [ebp - 0x8054]
je 0x1002794a
mov ecx, dword [ebp - 0x8058]
cmp dword [ecx], 0x22
je 0x10027954
mov ecx, dword [ebp - 0x802c]
mov word [esi + 0x97d6], cx
lea ecx, [ebp - 0x801c]
mov word [esi + 0x97f4], ax
call fcn.100279d0
lea ecx, [ebp - 0x804c]
call fcn.1001f760
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 0x100278f1
push eax
push str.ref_v1k
push str.WriteProcessMemoryFailed_for_ref_v1k.dll._Could_not_update_underwater_resolution.
jmp 0x100278e9
push str.vh2.exe
push esi
call fcn.1008a0d5
add esp, 8
test eax, eax
jne 0x1002791b
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.1007cf1a
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 0x100275c0
push eax
push 0x100d8a7c
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 0x100275f1
push eax
push 0x100d8a7c
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.10020190
sub esp, 0x18
mov byte [ebp - 4], 9
mov ecx, esp
push 0x101515bc
call fcn.10027a60
lea ecx, [ebp - 0x804c]
mov byte [ebp - 4], 8
call fcn.10046cb0
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 0x100d8a1c
mov dword [ecx + 0x10], 0
mov dword [ecx + 0x14], 0
call fcn.10020190
sub esp, 0x18
mov byte [ebp - 4], 0xb
lea eax, [ebp - 0x804c]
mov ecx, esp
push eax
call fcn.10027a60
lea ecx, [ebp - 0x801c]
mov byte [ebp - 4], 0xa
call fcn.1006d920
mov ecx, dword [ebp - 0x8018]
mov eax, 0x2aaaaaab
sub ecx, dword [ebp - 0x801c]
add esp, 0x30
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp eax, 2
je 0x10027710
mov eax, 0x140
lea ecx, [eax - 0x78]
jmp 0x1002773b
push ecx
mov ecx, dword [ebp - 0x801c]
call fcn.10027960
mov ecx, dword [ebp - 0x801c]
add ecx, 0x18
mov dword [ebp - 0x8070], eax
call fcn.10027960
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.100279d0
lea ecx, [ebp - 0x804c]
call fcn.1001f760
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.10020190
sub esp, 0x18
mov byte [ebp - 4], 0xd
mov ecx, esp
push 0x101515bc
call fcn.10027a60
lea ecx, [ebp - 0x8028]
mov byte [ebp - 4], 0xc
call fcn.10046cb0
add esp, 0x30
cmp dword [ebp - 0x8018], 0
jne 0x100277df
mov eax, 0x48
jmp 0x100277ee
push ecx
lea ecx, [ebp - 0x8028]
call fcn.10027960
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.1001f760
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.10020190
sub esp, 0x18
mov byte [ebp - 4], 0xf
mov ecx, esp
push 0x101515bc
call fcn.10027a60
lea ecx, [ebp - 0x8028]
mov byte [ebp - 4], 0xe
call fcn.10046cb0
add esp, 0x30
cmp dword [ebp - 0x8018], 0
jne 0x1002788f
xor eax, eax
jmp 0x1002789e
push ecx
lea ecx, [ebp - 0x8028]
call fcn.10027960
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.1001f760
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 0x100278f1
push eax
push 0x100d8a7c
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.1007cf15
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.1007c8d3
mov esp, ebp
pop ebp
ret
push str.invalid_stoi_argument
call fcn.1007dd16
push str.stoi_argument_out_of_range
call fcn.1007dd56
push str.invalid_stoi_argument
call fcn.1007dd16
push str.stoi_argument_out_of_range
call fcn.1007dd56
int3