Function at 0x416d7c
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xfffffe94
mov dword [esp], edx
mov edi, eax
mov byte [esp + 4], 0
mov eax, dword [esp]
mov dword [eax], 0xffffffff
mov eax, dword [0x4f988c]
dec eax
test eax, eax
jl 0x416dcb
inc eax
xor ebx, ebx
mov edx, ebx
shl edx, 3
sub edx, ebx
mov ecx, dword [0x4f9890]
cmp edi, dword [ecx + edx*4]
jne 0x416dc7
mov byte [esp + 4], 1
mov eax, dword [esp]
mov dword [eax], ebx
jmp 0x417197
inc ebx
dec eax
jne 0x416da6
push 0x104
lea eax, [esp + 0x20]
push eax
push edi
call fcn.00406fec
test eax, eax
je 0x417197
mov eax, edi
call fcn.0040a940
mov ebp, eax
test ebp, ebp
je 0x417197
lea eax, [ebp + 0x18]
mov dword [esp + 0x18], eax
mov byte [esp + 4], 1
mov eax, dword [0x4f9890]
call fcn.00405bf8
cmp eax, dword [0x4f988c]
jne 0x416e57
cmp dword [0x4f988c], 0
jne 0x416e37
push 0x10
mov eax, 0x4f9890
mov ecx, 1
mov edx, dword [0x416d0c]
call fcn.00405db4
add esp, 4
jmp 0x416e57
mov eax, dword [0x4f988c]
add eax, eax
push eax
mov eax, 0x4f9890
mov ecx, 1
mov edx, dword [0x416d0c]
call fcn.00405db4
add esp, 4
mov eax, dword [esp]
mov edx, dword [0x4f988c]
mov dword [eax], edx
inc dword [0x4f988c]
mov eax, dword [esp]
mov eax, dword [eax]
mov edx, eax
shl eax, 3
sub eax, edx
mov edx, dword [0x4f9890]
lea esi, [edx + eax*4]
mov dword [esi], edi
lea eax, [esi + 4]
lea edx, [esp + 0x1c]
mov ecx, 0x105
call fcn.004048f0
mov eax, dword [esi + 4]
call fcn.00404940
mov ebx, eax
cmp ebx, 1
jl 0x416ebf
mov eax, dword [esi + 4]
cmp byte [eax + ebx - 1], 0x5c
jne 0x416eba
lea eax, [esi + 4]
mov ecx, ebx
mov edx, 1
call fcn.00404bd8
jmp 0x416ebf
dec ebx
test ebx, ebx
jne 0x416e9f
mov edx, ebp
add edx, 0xf8
mov eax, edx
test byte [eax + 0x24], 0x20
je 0x416ee2
mov edx, dword [esi]
add edx, dword [eax + 0xc]
mov dword [esi + 8], edx
mov edx, dword [esi + 8]
add edx, dword [eax + 8]
mov dword [esi + 0xc], edx
jmp 0x416ef8
mov eax, dword [esi]
mov edx, dword [esp + 0x18]
add eax, dword [edx + 0x14]
mov dword [esi + 8], eax
mov edx, dword [esp + 0x18]
add eax, dword [edx + 4]
mov dword [esi + 0xc], eax
mov eax, dword [esi]
mov edx, dword [esp + 0x18]
add eax, dword [edx + 0x18]
mov dword [esi + 0x10], eax
mov edx, dword [esp + 0x18]
add eax, dword [edx + 8]
mov edx, dword [esp + 0x18]
add eax, dword [edx + 0xc]
mov dword [esi + 0x14], eax
mov eax, edi
call fcn.00416320
mov dword [esi + 0x18], eax
mov eax, dword [esi + 0x18]
cmp byte [eax + 0x38], 0
jne 0x416f35
mov eax, dword [esi + 0x18]
call fcn.004038a0
xor eax, eax
mov dword [esi + 0x18], eax
inc ebx
je 0x417197
cmp dword [esi + 0x18], 0
jne 0x416f57
mov eax, dword [esi + 4]
mov edx, 0x4171b0
call fcn.00408364
test al, al
je 0x417197
mov eax, dword [esi + 0x18]
test eax, eax
je 0x416f6d
cmp dword [eax + 0x28], 0
je 0x416f6d
mov eax, dword [eax + 0x28]
mov dword [esp + 0x14], eax
jmp 0x416f74
add edi, dword [ebp + 0x28]
mov dword [esp + 0x14], edi
mov ebp, dword [esp + 0x14]
lea edx, [esp + 0x124]
mov eax, ebp
call fcn.0040ef00
jmp 0x41717d
mov edi, dword [esp + 0x144]
cmp dword [esp + 0x12c], 0
je 0x41716d
cmp byte [esp + 0x12a], 0
je 0x416fc5
mov edx, dword [esi + 8]
mov eax, dword [esp + 0x12c]
cmp edx, eax
ja 0x417197
cmp eax, dword [esi + 0xc]
ja 0x417197
mov eax, dword [esp + 0x140]
mov dword [esp + 8], eax
lea edx, [esp + 0x10]
mov ecx, 2
mov ebx, dword [esp + 0x12c]
mov eax, ebx
call fcn.00410ac8
test al, al
je 0x41701b
cmp word [esp + 0x10], 0x25ff
jne 0x41701b
lea edx, [esp + 0x148]
mov eax, ebx
call fcn.0040ef00
push esi
push edi
lea esi, [esp + 0x150]
lea edi, [esp + 0x12c]
mov ecx, 9
rep movsd dword es:[edi], dword [esi]
pop edi
pop esi
push 0
push 0
or ecx, 0xffffffff
xor edx, edx
mov eax, dword [esp + 0x134]
call fcn.00417308
mov ebx, eax
cmp ebx, 0xffffffff
je 0x41716d
push 0xffffffffffffffff
imul eax, ebx, 0x13
mov edx, dword [0x4f9898]
mov edx, dword [edx + eax*4 + 4]
mov ecx, 1
mov eax, 0x4171c8
call fcn.004083b8
test eax, eax
jle 0x41716d
mov eax, dword [esp + 8]
cmp byte [eax], 0xe8
jne 0x417197
lea eax, [esp + 0xc]
push eax
push 0x40
push 5
mov eax, dword [esp + 0x14]
push eax
call fcn.00407224
test eax, eax
je 0x417197
push 6
push 0x40
call fcn.00407134
mov byte [eax], 0xe8
mov ecx, dword [esp + 0x12c]
mov edx, eax
sub ecx, edx
sub ecx, 5
mov dword [eax + 1], ecx
mov byte [eax + 5], 0xc3
mov ecx, dword [esp + 8]
mov byte [ecx], 0xe9
mov ecx, dword [esp + 8]
sub edx, ecx
sub edx, 5
inc ecx
mov dword [ecx], edx
push 1
push 0
mov ecx, dword [esp + 8]
mov ecx, dword [ecx]
mov edx, 0x4171d8
mov eax, dword [esp + 0x1c]
call fcn.00417308
mov ebx, eax
cmp ebx, 0xffffffff
je 0x417197
imul eax, ebx, 0x13
mov edx, dword [0x4f9898]
lea esi, [edx + eax*4 + 8]
mov eax, dword [esi + 0x20]
call fcn.00405bf8
mov ebx, eax
lea eax, [ebx + 1]
push eax
lea eax, [esi + 0x20]
mov ecx, 1
mov edx, dword [0x40b0e4]
call fcn.00405db4
add esp, 4
mov eax, ebx
shl eax, 3
sub eax, ebx
mov edx, dword [esi + 0x20]
mov cl, byte [esp + 0x129]
mov byte [edx + eax*4], cl
mov edx, dword [esi + 0x20]
mov dword [edx + eax*4 + 4], ebp
mov edx, dword [esi + 0x20]
mov dword [edx + eax*4 + 8], edi
mov edx, dword [esi + 0x20]
mov ecx, dword [esp + 0x12c]
mov dword [edx + eax*4 + 0xc], ecx
mov edx, dword [esi + 0x20]
mov cl, byte [esp + 0x12b]
mov byte [edx + eax*4 + 0x10], cl
mov edx, dword [esi + 0x20]
mov ecx, dword [esp + 0x130]
mov dword [edx + eax*4 + 0x14], ecx
mov edx, dword [esi + 0x20]
mov ecx, dword [esp + 0x134]
mov dword [edx + eax*4 + 0x18], ecx
jmp 0x417197
mov ebp, edi
lea edx, [esp + 0x124]
mov eax, edi
call fcn.0040ef00
cmp byte [esp + 0x124], 0
je 0x417197
mov eax, dword [esi + 0xc]
cmp eax, dword [esp + 0x144]
ja 0x416f8b
mov al, byte [esp + 4]
add esp, 0x16c
pop ebp
pop edi
pop esi
pop ebx
ret