Function at 0x46a490
Capabilities:
Inspect section memory permissions

Disassembly:
sub esp, 0x228
push ebx
push ebp
push esi
xor ebp, ebp
cmp eax, ebp
push edi
mov edi, ecx
mov esi, edx
mov dword [esp + 0x1c], ebp
jle 0x46a736
mov ebx, dword [esp + 0x244]
xor ecx, ecx
cmp eax, 1
sete cl
cmp eax, 2
mov dword [esp + 0x2c], 0x40000000
mov dword [esp + 0x20], ebx
mov dword [esp + 0x24], esi
mov dword [esp + 0x28], esi
lea ecx, [ecx*4 + 8]
mov dword [esp + 0x10], ecx
jne 0x46a4e7
mov dword [esp + 0x10], 0xa
neg edi
push ebp
sbb edi, edi
mov eax, ebx
cdq
push 0x23eb1c43
and edi, 0xf89d89e0
push edx
add edi, 0x20000000
push eax
mov dword [esp + 0x40], edi
call fcn.004b3e20
mov cl, 0x1c
call fcn.0051d0b0
cmp esi, eax
jle 0x46a527
lea edx, [ebx + ebx]
mov dword [esp + 0x18], 2
mov dword [esp + 0x24], edx
jmp 0x46a52f
mov dword [esp + 0x18], 1
cmp dword [esp + 0x18], ebp
mov edi, dword [esp + 0x240]
mov dword [edi], ebp
jle 0x46a82f
mov eax, dword [esp + 0x10]
cdq
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], edx
jmp 0x46a558
mov ebx, dword [esp + 0x244]
test ebp, ebp
jne 0x46a622
mov eax, dword [esp + 0x24]
shl eax, 0x14
cdq
idiv ebx
call fcn.0046a380
mov ecx, dword [esp + 0x14]
push ecx
mov ecx, dword [esp + 0x14]
cdq
push ecx
push edx
push eax
call fcn.004b3e20
mov cl, 0xf
call fcn.0051d0b0
mov esi, dword [esp + 0x244]
mov ebx, eax
mov eax, dword [esp + 0x24]
add ebx, 0x20
sar ebx, 5
and ebx, 0xfffffffe
lea edx, [esp + 0xfc]
push ebx
push edx
mov ecx, esi
mov dword [esp + 0x24], ebx
call fcn.0046a840
lea eax, [esp + 0x104]
push ebx
push eax
call fcn.0046ca90
mov ecx, dword [edi]
mov edx, dword [esp + 0x24c]
add esp, 0x10
test ebx, ebx
lea eax, [edx + ecx*4]
lea ecx, [esp + 0xfc]
jle 0x46a61b
mov dword [eax], esi
mov esi, ebx
sar esi, 1
lea edx, [eax + 4]
je 0x46a610
mov edi, dword [eax]
add edi, dword [ecx]
add eax, 4
mov dword [edx], edi
mov edi, dword [eax]
add edi, dword [ecx + 4]
add ecx, 4
add edx, 4
mov dword [edx], edi
add edx, 4
add ecx, 4
add eax, 4
sub esi, 1
jne 0x46a5e5
mov edi, dword [esp + 0x240]
test bl, 1
je 0x46a61b
mov eax, dword [eax]
add eax, dword [ecx]
mov dword [edx], eax
add dword [edi], ebx
jmp 0x46a71e
mov esi, dword [esp + ebp*4 + 0x24]
mov edi, dword [esp + ebp*4 + 0x20]
mov eax, esi
shl eax, 0x14
cdq
idiv edi
call fcn.0046a380
imul dword [esp + ebp*4 + 0x2c]
mov cl, 0x1e
call fcn.0051d0b0
mov ecx, dword [esp + 0x14]
push ecx
mov ecx, dword [esp + 0x14]
cdq
push ecx
push edx
push eax
call fcn.004b3e20
mov cl, 0xf
call fcn.0051d0b0
mov ebx, eax
add ebx, 0x10
sar ebx, 4
and ebx, 0xfffffffe
lea edx, [esp + 0x34]
push ebx
push edx
mov eax, esi
mov ecx, edi
call fcn.0046a840
lea eax, [esp + 0x3c]
push ebx
push eax
call fcn.0046ca90
mov ecx, dword [esp + 0x2c]
mov eax, dword [esp + ecx*4 + 0x108]
mov edx, dword [esp + 0x44]
add esp, 0x10
cmp eax, edx
jle 0x46a6be
mov ecx, dword [esp + ebx*4 + 0x30]
sub ecx, edx
sub eax, edx
sar ecx, 1
cmp eax, ecx
jle 0x46a6a6
mov eax, ecx
add edx, eax
mov dword [esp + 0x34], edx
sub dword [esp + ebx*4 + 0x30], eax
lea edx, [esp + 0x34]
push ebx
push edx
call fcn.0046ca90
add esp, 8
test ebx, ebx
mov eax, dword [esp + 0x240]
mov edx, dword [esp + 0x23c]
mov ecx, dword [eax]
lea eax, [edx + ecx*4]
lea edx, [esp + 0x34]
jle 0x46a713
mov esi, ebx
sar esi, 1
mov dword [eax], edi
lea ecx, [eax + 4]
je 0x46a708
mov edi, dword [edx]
add edi, dword [eax]
add edx, 4
mov dword [ecx], edi
mov edi, dword [edx]
add edi, dword [eax + 4]
add eax, 4
add ecx, 4
mov dword [ecx], edi
add ecx, 4
add edx, 4
add eax, 4
sub esi, 1
jne 0x46a6e4
test bl, 1
je 0x46a713
mov edx, dword [edx]
add edx, dword [eax]
mov dword [ecx], edx
mov eax, dword [esp + 0x240]
add dword [eax], ebx
mov edi, eax
add ebp, 1
cmp ebp, dword [esp + 0x18]
jl 0x46a551
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x228
ret
push 0x138
lea eax, [esp + 0x104]
push ebp
push eax
mov dword [esp + 0x108], ebp
call fcn.004b3a80
add esp, 0xc
xor ebx, ebx
cmp edi, ebp
mov edx, esi
je 0x46a76e
mov ebp, dword [esp + 0x244]
sub edx, ebp
sar edx, 1
lea eax, [ebx + 1]
lea ecx, [edx + ebp]
jmp 0x46a78e
mov ecx, dword [esp + 0x244]
sub edx, ecx
test dl, 1
je 0x46a77f
sub edx, 1
mov ebp, dword [esp + 0x244]
mov eax, 2
lea ecx, [ecx + edx*2]
sub esi, ecx
xor ecx, ecx
test edx, edx
jle 0x46a7a3
mov ecx, edx
lea edi, [esp + 0xfc]
rep stosd dword es:[edi], eax
mov ecx, edx
test esi, esi
jge 0x46a7b0
xor ecx, ecx
mov ebx, 1
test esi, esi
jle 0x46a7b8
or ebx, 0xffffffff
lea ecx, [edx - 1]
test esi, esi
je 0x46a7d8
lea edi, [ebx*4]
lea eax, [esp + ecx*4 + 0xfc]
lea ebx, [ebx]
sub dword [eax], ebx
add eax, edi
add esi, ebx
jne 0x46a7d0
test edx, edx
mov eax, dword [esp + 0x23c]
mov esi, eax
lea ecx, [esp + 0xfc]
jle 0x46a826
mov dword [eax], ebp
mov edi, edx
add eax, 4
sar edi, 1
je 0x46a81b
mov ebx, dword [ecx]
add ebx, dword [esi]
add ecx, 4
mov dword [eax], ebx
mov ebx, dword [ecx]
add ebx, dword [esi + 4]
add esi, 4
add eax, 4
mov dword [eax], ebx
add eax, 4
add ecx, 4
add esi, 4
sub edi, 1
jne 0x46a7f7
test dl, 1
je 0x46a826
mov ecx, dword [ecx]
add ecx, dword [esi]
mov dword [eax], ecx
mov eax, dword [esp + 0x240]
mov dword [eax], edx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x228
ret