Function at 0x4bba60
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x6eb198
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x9d8
mov eax, dword [0x7ce4e4]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x97c], ecx
mov ecx, dword [ebx + 0xc]
mov eax, dword [ebx + 0x10]
mov dword [ebp - 0x968], ecx
mov dword [ebp - 0x958], eax
test ecx, ecx
jne 0x4bbac4
xor eax, eax
jmp 0x4bc67d
mov byte [ebp - 0x98c], 0
mov dword [ebp - 0x990], 0
lea ecx, [ebp - 0x6c0]
mov dword [ebp - 4], 0
call fcn.00499a50
push 1
lea ecx, [ebp - 0x6b8]
mov dword [ebp - 0x5a0], 0
mov dword [ebp - 0x6bc], 0
call fcn.0049a590
cmp byte [ebp - 0x5a4], 0
lea eax, [ebp - 0x6b4]
cmove eax, dword [ebp - 0x6b8]
xor ecx, ecx
mov word [eax + 4], cx
lea edx, [ebp - 0x6c0]
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x990]
call fcn.004a32d0
test al, al
jne 0x4bbb42
xor edi, edi
jmp 0x4bc644
push 0
push 0
push 0
push str.sgim_ath_v2.bin
push str.Data
lea eax, [ebp - 0x6c0]
push eax
lea ecx, [ebp - 0x950]
call fcn.0049aba0
push 0x4bdad0
push 0x4bda90
push 2
push 0x20
lea eax, [ebp - 0x828]
mov byte [ebp - 4], 2
push eax
call fcn.005bea40
lea ecx, [ebp - 0x7e8]
call fcn.00499a50
mov dword [ebp - 0x80c], 0
mov dword [ebp - 0x7ec], 0
mov byte [ebp - 0x6c4], 1
lea eax, [ebp - 0x950]
mov byte [ebp - 4], 3
push eax
lea eax, [ebp - 0x990]
push eax
lea ecx, [ebp - 0x828]
call fcn.004be7f0
test al, al
jne 0x4bbbd0
xor edi, edi
jmp 0x4bc5d3
xor esi, esi
mov dword [ebp - 0x9e4], fcn.005cff37
mov dword [ebp - 0x9e0], fcn.005cfea2
mov dword [ebp - 0x9dc], fcn.005cff1c
mov dword [ebp - 0x974], esi
mov dword [ebp - 0x9d8], esi
mov dword [ebp - 0x9d4], 0x1fff8
mov dword [ebp - method.common::allocator_unsigned_char__class_common::TAllocDefault_.virtual_0], vtable.common::t_heap.0
lea ecx, [ebp - 0x598]
call fcn.00499a50
lea ecx, [ebp - 0x348]
call fcn.00499a50
lea ecx, [ebp - 0x470]
call fcn.00499a50
mov dword [ebp - 0x9d0], esi
mov dword [ebp - 0x9cc], esi
mov dword [ebp - 0x9c8], 0x11
mov dword [ebp - 0x9b0], esi
mov dword [ebp - 0x9ac], 0xa
mov dword [ebp - 0x9a8], esi
mov dword [ebp - 0x9a4], esi
mov dword [ebp - 0x9a0], fcn.005cff37
mov dword [ebp - 0x99c], fcn.005cfea2
mov dword [ebp - 0x998], fcn.005cff1c
mov dword [ebp - 0x9c4], 0x3f400000
mov dword [ebp - 0x9c0], 0x3e800000
mov dword [ebp - 0x9bc], 0x40100000
mov dword [ebp - 0x9b8], 0x26
mov dword [ebp - 0x9b4], esi
push dword [ebp - 0x958]
xor edx, edx
mov byte [ebp - 4], 8
lea ecx, [ebp - 0x828]
mov dword [ebp - 0x96c], edx
xor edi, edi
call fcn.004bdb20
test eax, eax
jle 0x4bc0a8
xor eax, eax
mov dword [ebp - 0x978], eax
nop
mov edi, dword [ebp - 0x958]
cmp edi, 1
ja 0x4bc086
shl edi, 5
test edx, edx
js 0x4bc086
cmp edx, dword [ebp + edi - 0x80c]
jge 0x4bc086
mov edi, dword [ebp + edi - 0x828]
add edi, eax
je 0x4bc054
push 1
lea ecx, [ebp - 0x590]
mov dword [ebp - 0x478], 0
mov dword [ebp - 0x594], 0
call fcn.0049a590
cmp byte [ebp - 0x47c], 0
lea eax, [ebp - 0x58c]
push 1
cmove eax, dword [ebp - 0x590]
xor ecx, ecx
mov word [eax + 4], cx
mov dword [ebp - 0x228], ecx
mov dword [ebp - 0x344], ecx
lea ecx, [ebp - 0x340]
call fcn.0049a590
cmp byte [ebp - 0x22c], 0
lea eax, [ebp - 0x33c]
push 1
cmove eax, dword [ebp - 0x340]
xor ecx, ecx
mov word [eax + 4], cx
mov dword [ebp - 0x350], ecx
mov dword [ebp - 0x46c], ecx
lea ecx, [ebp - 0x468]
call fcn.0049a590
cmp byte [ebp - 0x354], 0
lea eax, [ebp - 0x464]
cmove eax, dword [ebp - 0x468]
xor ecx, ecx
mov word [eax + 4], cx
mov al, byte [edi + 0x11c]
mov byte [ebp - 0x961], al
test al, al
lea eax, [edi + 0xc]
jne 0x4bbdcd
mov eax, dword [edi + 8]
add eax, 4
lea ecx, [ebp - 0x9d0]
mov dword [ebp - 0x95c], eax
lea eax, [ebp - 0x960]
push eax
lea eax, [ebp - 0x994]
push eax
lea eax, [ebp - 0x988]
push eax
lea eax, [ebp - 0x95c]
push eax
call fcn.004bc9f0
test eax, eax
jne 0x4bbf94
cmp byte [ebp - 0x961], al
lea eax, [edi + 0xc]
jne 0x4bbe13
mov eax, dword [edi + 8]
add eax, 4
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov dword [ebp - 0x95c], eax
test eax, eax
je 0x4bc002
push 0x208
lea eax, [ebp - 0x220]
push 0
push eax
call fcn.005c0be0
add esp, 0xc
lea eax, [ebp - 0x220]
push 0x104
push eax
push dword [ebp - 0x95c]
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea edx, [ebp - 0x348]
lea ecx, [ebp - 0x220]
call fcn.004bc730
test al, al
je 0x4bc002
cmp byte [ebp - 0x22c], 0
lea eax, [ebp - 0x33c]
cmove eax, dword [ebp - 0x340]
add eax, 4
mov dword [ebp - 0x960], eax
je 0x4bbf2c
mov ecx, eax
lea edx, [ecx + 2]
nop word [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4bbea0
sub ecx, edx
sar ecx, 1
lea ecx, [ecx*2 + 2]
mov dword [ebp - 0x95c], ecx
test esi, esi
je 0x4bbeda
mov eax, dword [esi]
cmp eax, 0x1fff8
jae 0x4bbeda
lea edx, [eax + ecx]
cmp edx, 0x1fff8
ja 0x4bbeda
mov dword [esi], edx
add eax, esi
jmp 0x4bbf13
mov eax, ecx
cmp ecx, 0x1fff8
mov ecx, 0x1fff8
cmovb eax, ecx
add eax, 8
push eax
call fcn.005cff37
add esp, 4
test eax, eax
je 0x4bbf2c
mov ecx, dword [ebp - 0x95c]
mov dword [eax + 4], esi
mov esi, eax
mov dword [eax], ecx
mov dword [ebp - 0x974], esi
mov dword [ebp - 0x9d8], esi
lea esi, [eax + 8]
test esi, esi
je 0x4bbf2e
push ecx
push dword [ebp - 0x960]
push esi
call fcn.005c0660
add esp, 0xc
jmp 0x4bbf2e
xor esi, esi
cmp byte [edi + 0x11c], 0
lea eax, [edi + 0xc]
jne 0x4bbf3d
mov eax, dword [edi + 8]
add eax, 4
lea ecx, [ebp - 0x9d0]
mov dword [ebp - 0x95c], eax
lea eax, [ebp - 0x960]
push eax
lea eax, [ebp - 0x970]
push eax
lea eax, [ebp - 0x954]
push eax
lea eax, [ebp - 0x95c]
push eax
call fcn.004bc9f0
test eax, eax
jne 0x4bbf8f
push dword [ebp - 0x970]
lea eax, [ebp - 0x95c]
push dword [ebp - 0x954]
lea ecx, [ebp - 0x9d0]
push eax
call fcn.004bcad0
mov dword [eax + 4], esi
jmp 0x4bbffc
mov eax, dword [eax + 4]
mov ecx, 0x786008
test eax, eax
cmovne ecx, eax
mov esi, ecx
mov dword [ebp - 0x960], ecx
lea ecx, [esi + 2]
nop dword [eax]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x4bbfb0
sub esi, ecx
lea ecx, [ebp - 0x340]
sar esi, 1
mov dword [ebp - 0x344], esi
inc esi
push esi
call fcn.0049a590
cmp byte [ebp - 0x22c], 0
lea eax, [esi + esi]
push eax
push dword [ebp - 0x960]
lea ecx, [ebp - 0x33c]
cmove ecx, dword [ebp - 0x340]
add ecx, 4
push ecx
call fcn.005c0660
add esp, 0xc
mov esi, dword [ebp - 0x974]
cmp dword [ebp - 0x344], 0
je 0x4bc048
cmp byte [edi + 0x364], 0
lea eax, [edi + 0x254]
jne 0x4bc020
mov eax, dword [edi + 0x250]
cmp byte [ebp - 0x22c], 0
lea ecx, [ebp - 0x33c]
cmove ecx, dword [ebp - 0x340]
add eax, 4
push eax
lea eax, [ecx + 4]
push eax
call fcn.005d0064
add esp, 8
test eax, eax
je 0x4bc08a
mov eax, dword [ebp - 0x978]
mov edx, dword [ebp - 0x96c]
push dword [ebp - 0x958]
add eax, 0x490
lea ecx, [ebp - 0x828]
inc edx
mov dword [ebp - 0x978], eax
mov dword [ebp - 0x96c], edx
call fcn.004bdb20
cmp edx, eax
jge 0x4bc0a8
mov eax, dword [ebp - 0x978]
jmp 0x4bbce0
xor edi, edi
jmp 0x4bc054
push edi
lea ecx, [ebp - 0x598]
call fcn.00499d10
lea eax, [edi + 0x36c]
push eax
lea ecx, [ebp - 0x470]
call fcn.00499d10
lea ecx, [ebp - 0x9d0]
call fcn.00498420
cmp dword [ebp - 0x46c], 0
je 0x4bc51e
cmp dword [ebp - 0x344], 0
je 0x4bc51e
cmp dword [ebp - 0x594], 0
je 0x4bc51e
test edi, edi
je 0x4bc51e
cmp byte [ebp - 0x47c], 0
lea eax, [ebp - 0x58c]
cmove eax, dword [ebp - 0x590]
add eax, 4
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x4bc51e
push dword [ebp - 0x968]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x96c], eax
test eax, eax
je 0x4bc51e
cmp byte [ebx + 8], 0
mov al, byte [eax]
jne 0x4bc137
cmp al, 0xe9
je 0x4bc137
cmp al, 0xe8
jne 0x4bc51e
push 0x28
call fcn.005be217
mov esi, dword [ebp - 0x97c]
add esp, 4
cmp byte [ebp - 0x47c], 0
mov edi, eax
lea eax, [ebp - 0x58c]
cmove eax, dword [ebp - 0x590]
add eax, 4
lea ecx, [esi + 0x18]
push eax
call fcn.004bf190
mov dword [edi], eax
add esi, 0x1c
mov eax, dword [ebp - 0x968]
mov ecx, esi
mov dword [ebp - 0x954], eax
lea eax, [ebp - 0x988]
push eax
lea eax, [ebp - 0x994]
push eax
lea eax, [ebp - 0x970]
push eax
lea eax, [ebp - 0x954]
push eax
call fcn.004bf460
test eax, eax
je 0x4bc1a9
mov ecx, dword [eax + 4]
jmp 0x4bc2ea
mov edx, dword [ebp - 0x968]
lea ecx, [edx + 1]
mov al, byte [edx]
inc edx
test al, al
jne 0x4bc1b2
sub edx, ecx
lea eax, [edx + 1]
mov dword [ebp - 0x954], eax
push eax
mov eax, dword [ebp - 0x97c]
mov ecx, dword [eax + 0x18]
call fcn.0047f370
mov dword [ebp - 0x958], eax
test eax, eax
je 0x4bc1f8
push dword [ebp - 0x954]
push dword [ebp - 0x968]
push eax
call fcn.005c0660
mov eax, dword [ebp - 0x958]
add esp, 0xc
mov dword [ebp - 0x95c], eax
mov ecx, esi
lea eax, [ebp - 0x988]
push eax
lea eax, [ebp - 0x960]
push eax
lea eax, [ebp - 0x968]
push eax
lea eax, [ebp - 0x95c]
push eax
call fcn.004bf460
test eax, eax
jne 0x4bc2e1
cmp dword [esi], eax
jne 0x4bc2c7
mov eax, dword [esi + 8]
mov ecx, dword [esi + 0x30]
mov dword [ebp - 0x970], eax
shl eax, 2
mov dword [ebp - 0x954], eax
test ecx, ecx
jne 0x4bc24e
mov dword [esi], ecx
jmp 0x4bc2c7
add eax, 4
push eax
call fcn.0047f370
mov ecx, dword [ebp - 0x954]
mov dword [eax], ecx
add eax, 4
mov dword [esi], eax
je 0x4bc2c7
push ecx
push 0
push eax
call fcn.005c0be0
mov eax, dword [ebp - 0x970]
add esp, 0xc
mov dword [esi + 8], eax
movd xmm0, eax
cvtdq2pd xmm0, xmm0
shr eax, 0x1f
addsd xmm0, qword [eax*8 + 0x79b450]
cvtpd2ps xmm0, xmm0
movss dword [ebp - 0x954], xmm0
mulss xmm0, dword [esi + 0x14]
call fcn.005beb30
movss xmm0, dword [ebp - 0x954]
mulss xmm0, dword [esi + 0x10]
mov dword [esi + 0x18], eax
call fcn.005beb30
mov ecx, eax
xor edx, edx
cmp ecx, 0x11
cmovb eax, edx
mov dword [esi + 0x1c], eax
push dword [ebp - 0x960]
lea eax, [ebp - 0x95c]
mov ecx, esi
push dword [ebp - 0x968]
push eax
call fcn.004a6340
mov ecx, dword [ebp - 0x958]
mov dword [eax + 4], ecx
mov dword [edi + 4], ecx
lea eax, [ebp - 0x33c]
cmp byte [ebp - 0x22c], 0
mov ecx, dword [ebp - 0x97c]
cmove eax, dword [ebp - 0x340]
add eax, 4
push eax
lea ecx, [ecx + 0x18]
call fcn.004bf190
mov dword [edi + 8], eax
lea ecx, [ebp - 0x464]
mov eax, dword [ebp - 0x96c]
movups xmm0, xmmword [eax]
mov dword [edi + 0x20], eax
movups xmmword [edi + 0xc], xmm0
cmp byte [ebp - 0x354], 0
cmove ecx, dword [ebp - 0x468]
add ecx, 4
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4bc340
push 0x40
sub ecx, edx
push 0x1000
sar ecx, 1
shr ecx, 1
push 0x15
push 0
mov dword [ebp - 0x960], ecx
mov byte [edi + 0x1c], cl
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
cmp byte [ebp - 0x354], 0
lea ecx, [ebp - 0x464]
mov dword [ebp - 0x958], eax
cmove ecx, dword [ebp - 0x468]
add ecx, 4
mov dword [ebp - 0x954], ecx
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4bc391
sub ecx, edx
sar ecx, 1
mov eax, ecx
cdq
sub eax, edx
sar eax, 1
mov dword [ebp - 0x970], eax
cmp eax, 0x15
jg 0x4bc4ff
xor esi, esi
test eax, eax
jle 0x4bc4ff
mov edx, dword [ebp - 0x954]
movzx ecx, word [edx + esi*4]
lea eax, [ecx - 0x30]
cmp ax, 9
jbe 0x4bc3ec
lea eax, [ecx - 0x61]
cmp ax, 5
jbe 0x4bc3e9
lea eax, [ecx - 0x41]
cmp ax, 5
ja 0x4bc4ff
add cl, 9
movzx edx, word [edx + esi*4 + 2]
shl cl, 4
lea eax, [edx - 0x30]
cmp ax, 9
ja 0x4bc402
sub dl, 0x30
jmp 0x4bc420
lea eax, [edx - 0x61]
cmp ax, 5
ja 0x4bc410
sub dl, 0x57
jmp 0x4bc420
lea eax, [edx - 0x41]
cmp ax, 5
ja 0x4bc4ff
sub dl, 0x37
add dl, cl
mov ecx, dword [ebp - 0x958]
mov byte [esi + ecx], dl
inc esi
cmp esi, dword [ebp - 0x970]
jl 0x4bc3c0
mov eax, dword [ebp - 0x96c]
mov edx, 0x15
sub eax, ecx
mov byte [ebp - 0x984], 0xe9
sub eax, 5
mov dword [ebp - 0x983], eax
mov eax, dword [ebp - 0x960]
movzx eax, al
sub edx, eax
add ecx, eax
jne 0x4bc46d
call fcn.005c45dc
mov dword [eax], 0x16
jmp 0x4bc49c
cmp edx, 5
jb 0x4bc485
mov eax, dword [ebp - 0x984]
mov dword [ecx], eax
mov al, byte [ebp - 0x980]
mov byte [ecx + 4], al
jmp 0x4bc4a1
push edx
push 0
push ecx
call fcn.005c0be0
add esp, 0xc
call fcn.005c45dc
mov dword [eax], 0x22
call fcn.005c44ae
mov esi, dword [ebp - 0x97c]
mov eax, dword [ebp - 0x958]
add esi, 0x84
mov dword [edi + 0x24], eax
mov eax, dword [esi + 8]
mov ecx, dword [esi + 4]
cmp ecx, eax
jne 0x4bc4ec
test eax, eax
jne 0x4bc4d2
mov eax, dword [esi + 0xc]
test eax, eax
jne 0x4bc4d7
mov eax, 1
jmp 0x4bc4e0
lea eax, [ecx + ecx]
test eax, eax
js 0x4bc520
cmp eax, 0x1fffffff
ja 0x4bc520
push eax
mov ecx, esi
call fcn.004a5f90
test eax, eax
je 0x4bc520
mov ecx, dword [esi + 4]
mov eax, dword [esi]
lea eax, [eax + ecx*4]
test eax, eax
je 0x4bc4fa
mov dword [eax], edi
inc dword [esi + 4]
jmp 0x4bc520
push 0x28
push edi
call fcn.005be247
mov eax, dword [ebp - 0x958]
add esp, 8
push 0x8000
push 0
push eax
call dword [sym.imp.KERNEL32.dll_VirtualFree]
xor edi, edi
lea ecx, [ebp - 0x9d0]
mov byte [ebp - 4], 0x15
call fcn.00498420
cmp byte [ebp - 0x354], 0
mov dword [ebp - method.t_str.virtual_0], vtable.t_str.0
jne 0x4bc55b
mov eax, dword [ebp - 0x468]
lea ecx, [ebp - 0x464]
cmp eax, ecx
je 0x4bc55b
push eax
call fcn.005cff1c
add esp, 4
cmp byte [ebp - 0x22c], 0
mov dword [ebp - method.t_str.virtual_0], vtable.t_str.0
jne 0x4bc587
mov eax, dword [ebp - 0x340]
lea ecx, [ebp - 0x33c]
cmp eax, ecx
je 0x4bc587
push eax
call fcn.005cff1c
add esp, 4
cmp byte [ebp - 0x47c], 0
mov dword [ebp - method.t_str.virtual_0], vtable.t_str.0
jne 0x4bc5b3
mov eax, dword [ebp - 0x590]
lea ecx, [ebp - 0x58c]
cmp eax, ecx
je 0x4bc5b3
push eax
call fcn.005cff1c
add esp, 4
mov byte [ebp - 4], 0x16
mov esi, dword [ebp - 0x974]
test esi, esi
je 0x4bc5d3
mov eax, esi
push eax
mov esi, dword [eax + 4]
call fcn.005cff1c
add esp, 4
test esi, esi
jne 0x4bc5c1
mov byte [ebp - 4], 0x17
cmp byte [ebp - 0x6cc], 0
mov dword [ebp - method.t_str.virtual_0], vtable.t_str.0
jne 0x4bc603
mov eax, dword [ebp - 0x7e0]
lea ecx, [ebp - 0x7dc]
cmp eax, ecx
je 0x4bc603
push eax
call fcn.005cff1c
add esp, 4
push 0x4bdad0
push 2
push 0x20
lea eax, [ebp - 0x828]
push eax
call fcn.005be92b
cmp byte [ebp - 0x834], 0
mov dword [ebp - method.t_str.virtual_0], vtable.t_str.0
jne 0x4bc644
mov eax, dword [ebp - 0x948]
lea ecx, [ebp - 0x944]
cmp eax, ecx
je 0x4bc644
push eax
call fcn.005cff1c
add esp, 4
cmp byte [ebp - 0x5a4], 0
mov dword [ebp - method.t_str.virtual_0], vtable.t_str.0
jne 0x4bc670
mov eax, dword [ebp - 0x6b8]
lea ecx, [ebp - 0x6b4]
cmp eax, ecx
je 0x4bc670
push eax
call fcn.005cff1c
add esp, 4
lea ecx, [ebp - 0x990]
call fcn.0049c790
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.005be209
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret 0xc