Function at 0x4f6be0
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x5a3a57
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
mov eax, 0x314c
call fcn.00587e30
push ebx
push esi
mov ebx, ecx
push edi
lea ecx, [esp + 0x134]
mov dword [esp + 0x48], ebx
call fcn.00576920
mov eax, dword [ebp + 8]
mov esi, dword [eax + 4]
test esi, esi
mov dword [esp + 0x3164], 0
je 0x4f6c56
mov eax, esi
mov eax, dword [eax + 8]
mov esi, dword [esi]
push eax
push 0x5d0cb8
call fcn.00591e30
add esp, 8
push eax
lea ecx, [esp + 0x138]
call fcn.00455380
test esi, esi
jne 0x4f6c30
lea esi, [esp + 0x158]
mov edi, 0x100
mov ecx, esi
call fcn.0041c440
add esi, 8
dec edi
jne 0x4f6c62
lea esi, [esp + 0x958]
mov edi, 0x100
jmp 0x4f6c80
mov ecx, esi
call fcn.0041c440
add esi, 8
dec edi
jne 0x4f6c80
xor eax, eax
mov ecx, 0x200
lea edi, [esp + 0x158]
rep stosd dword es:[edi], eax
mov ecx, 0x200
lea edi, [esp + 0x958]
rep stosd dword es:[edi], eax
mov ecx, 0x400
lea edi, [esp + 0x1158]
rep stosd dword es:[edi], eax
mov ecx, 0x400
lea edi, [esp + 0x2158]
rep stosd dword es:[edi], eax
mov eax, dword [ebp + 0x10]
add eax, 0xfffffe50
cdq
and edx, 0xf
add eax, edx
mov ecx, eax
mov eax, dword [ebp + 0x18]
cdq
and edx, 0xf
add eax, edx
sar ecx, 4
mov edi, eax
push ecx
sar edi, 4
push 0
add edi, 4
call dword [sym.imp.SanCalc.dll_int___cdecl_max_int__int_]
mov ecx, dword [0x11c76a8]
mov edx, dword [0x11c76ac]
mov esi, eax
lea eax, [edx + ecx - 2]
push eax
push edi
call dword [sym.imp.SanCalc.dll_int___cdecl_min_int__int_]
xor ecx, ecx
add esp, 0x10
cmp esi, eax
mov dword [esp + 0x38], eax
mov dword [esp + 0x18], ecx
mov dword [esp + 0x20], ecx
mov dword [esp + 0x40], ecx
mov dword [esp + 0x4c], ecx
jg 0x4f6fc9
lea ecx, [esp + 0x2158]
lea edx, [esp + 0x958]
lea eax, [esp + 0x1158]
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], edx
mov dword [esp + 0x1c], eax
lea edi, [esp + 0x158]
jmp 0x4f6d60
mov ecx, dword [0x11c76ac]
lea eax, [ecx - 1]
cmp eax, esi
jle 0x4f6d93
push 1
push esi
push 0
push edi
mov ecx, ebx
call fcn.004f64e0
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
push esi
inc eax
push 0
mov dword [esp + 0x20], eax
add edi, 8
push ecx
jmp 0x4f6e6e
jne 0x4f6dcf
push 1
push esi
push 0
push edi
mov ecx, ebx
call fcn.004f64e0
mov ecx, dword [esp + 0x18]
push 4
push esi
inc ecx
push 0
mov dword [esp + 0x24], ecx
add edi, 8
push edi
mov ecx, ebx
call fcn.004f64e0
mov ecx, dword [esp + 0x18]
inc ecx
push esi
mov dword [esp + 0x1c], ecx
add edi, 8
push 0
jmp 0x4f6e69
mov edx, dword [0x11c76a8]
lea ecx, [ecx + edx - 2]
cmp ecx, esi
jle 0x4f6e16
mov ecx, dword [0x11c76ac]
push 4
push eax
mov eax, esi
sub eax, ecx
inc eax
push eax
push edi
mov ecx, ebx
call fcn.004f64e0
mov ecx, dword [esp + 0x18]
mov eax, dword [0x11c76ac]
inc ecx
mov edx, esi
mov dword [esp + 0x18], ecx
lea ecx, [eax - 1]
sub edx, eax
mov eax, dword [esp + 0x1c]
add edi, 8
push ecx
inc edx
push edx
push eax
jmp 0x4f6e6e
jne 0x4f6e89
push 4
push eax
mov eax, dword [0x11c76ac]
mov ecx, esi
sub ecx, eax
inc ecx
push ecx
push edi
mov ecx, ebx
call fcn.004f64e0
mov ecx, dword [esp + 0x18]
mov eax, dword [0x11c76ac]
inc ecx
mov dword [esp + 0x18], ecx
push 2
mov ecx, esi
sub ecx, eax
lea edx, [eax - 1]
add edi, 8
push edx
inc ecx
push ecx
push edi
mov ecx, ebx
call fcn.004f64e0
inc dword [esp + 0x18]
mov eax, dword [0x11c76ac]
mov ecx, esi
lea edx, [eax - 1]
sub ecx, eax
add edi, 8
push edx
inc ecx
push ecx
mov edx, dword [esp + 0x24]
push edx
mov ecx, ebx
call fcn.004f65b0
mov ecx, dword [esp + 0x40]
mov eax, dword [esp + 0x1c]
inc ecx
add eax, 0x10
mov dword [esp + 0x40], ecx
mov dword [esp + 0x1c], eax
mov edx, dword [0x11c76ac]
lea eax, [edx - 1]
cmp eax, esi
jle 0x4f6ec8
mov eax, dword [esp + 0x14]
push 1
push 0
push esi
push eax
mov ecx, ebx
call fcn.004f64e0
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
push 0
inc eax
add edx, 8
push esi
mov dword [esp + 0x28], eax
mov dword [esp + 0x1c], edx
push ecx
jmp 0x4f6fa1
jne 0x4f6f1d
mov edx, dword [esp + 0x14]
push 1
push 0
push esi
push edx
mov ecx, ebx
call fcn.004f64e0
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x20]
push 8
push 0
add eax, 8
push esi
inc edx
push eax
mov ecx, ebx
mov dword [esp + 0x30], edx
mov dword [esp + 0x24], eax
call fcn.004f64e0
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x14]
inc eax
push 0
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x14]
add edx, 8
push esi
mov dword [esp + 0x1c], edx
push eax
jmp 0x4f6fa1
mov ecx, dword [0x11c76a8]
lea eax, [edx + ecx - 2]
cmp eax, esi
jle 0x4f6f33
mov eax, dword [esp + 0x14]
push 8
jmp 0x4f6f6b
jne 0x4f6fbc
mov eax, esi
sub eax, ecx
push 8
inc eax
dec ecx
push eax
push ecx
mov ecx, dword [esp + 0x20]
push ecx
mov ecx, ebx
call fcn.004f64e0
mov eax, dword [esp + 0x20]
mov ecx, dword [0x11c76a8]
inc eax
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x14]
add eax, 8
mov dword [esp + 0x14], eax
push 2
mov edx, esi
sub edx, ecx
inc edx
dec ecx
push edx
push ecx
mov ecx, ebx
push eax
call fcn.004f64e0
mov ecx, dword [esp + 0x20]
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x10]
inc ecx
add eax, 8
mov dword [esp + 0x20], ecx
mov dword [esp + 0x14], eax
mov eax, dword [0x11c76a8]
mov ecx, esi
sub ecx, eax
inc ecx
push ecx
dec eax
push eax
push edx
mov ecx, ebx
call fcn.004f65b0
mov ecx, dword [esp + 0x4c]
mov eax, dword [esp + 0x10]
inc ecx
add eax, 0x10
mov dword [esp + 0x4c], ecx
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x38]
inc esi
cmp esi, eax
jle 0x4f6d60
push 0x2a1f
call fcn.0057b1c0
mov edx, dword [ebp + 0x10]
mov edi, dword [ebp + 0x14]
mov esi, dword [ebp + 0xc]
mov dword [esp + 0x18], eax
mov eax, dword [ebp + 0x18]
sub eax, edx
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x1c]
add esp, 4
sub edi, esi
dec eax
test eax, eax
jle 0x4f7179
lea ecx, [esp + 0x160]
mov dword [esp + 0x10], ecx
mov dword [esp + 0x24], eax
lea ebx, [ebx]
mov eax, dword [esp + 0x10]
mov edx, dword [eax]
mov eax, dword [eax - 8]
push edx
push eax
call dword [sym.imp.SanCalc.dll_int___cdecl_max_int__int_]
mov ecx, dword [ebp + 0xc]
add esp, 8
cmp eax, ecx
jle 0x4f715f
mov ecx, dword [esp + 0x10]
mov eax, dword [ecx + 4]
cmp eax, dword [ebp + 0x10]
jl 0x4f715f
mov edx, dword [esp + 0x10]
sub eax, dword [edx - 4]
test eax, eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x1c], 0
jle 0x4f715f
lea ebx, [ebx]
mov esi, dword [esp + 0x10]
mov ecx, dword [esi - 8]
mov ebx, dword [esi]
mov eax, ecx
sub eax, ebx
mov ebx, dword [esp + 0x1c]
imul eax, ebx
cdq
idiv dword [esp + 0x30]
sub ecx, eax
mov eax, ecx
mov ecx, dword [esi - 4]
sub ecx, dword [ebp + 0x10]
add ecx, ebx
mov dword [esp + 0x34], ecx
js 0x4f714a
cmp dword [esp + 0x2c], ecx
jle 0x4f714a
mov esi, dword [ebp + 0xc]
lea edx, [edi - 1]
push edx
sub eax, esi
push eax
call dword [sym.imp.SanCalc.dll_int___cdecl_min_int__int_]
mov ecx, eax
mov eax, dword [esp + 0x18]
mov edx, dword [eax - 4]
mov eax, ebx
lea eax, [edx + eax + 0xc0]
cdq
mov esi, 0xc0
idiv esi
add esp, 8
xor esi, esi
test ecx, ecx
mov dword [esp + 0x28], ecx
mov dword [esp + 0x38], edx
jle 0x4f714a
mov ecx, dword [ebp + 0xc]
lea eax, [esi + ecx]
cdq
mov ecx, 0x180
idiv ecx
mov ebx, edx
test ebx, ebx
jge 0x4f7104
or edx, 0xffffffff
sub edx, ebx
mov eax, 0xaaaaaaab
mul edx
shr edx, 8
lea eax, [edx + edx*2]
shl eax, 7
lea ebx, [ebx + eax + 0x180]
mov edx, dword [esp + 0x28]
mov ecx, 0x180
sub ecx, ebx
push ecx
sub edx, esi
push edx
call dword [sym.imp.SanCalc.dll_int___cdecl_min_int__int_]
mov ecx, dword [esp + 0x40]
mov edx, dword [esp + 0x3c]
add esp, 8
push ecx
mov ecx, dword [esp + 0x18]
push ebx
push 1
push eax
push edx
mov dword [esp + 0x50], eax
mov eax, dword [ebp + 0x1c]
push esi
push eax
call fcn.0057a740
mov ecx, dword [esp + 0x3c]
mov eax, dword [esp + 0x28]
add esi, ecx
cmp esi, eax
jl 0x4f70d4
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x30]
inc eax
cmp eax, ecx
mov dword [esp + 0x1c], eax
jl 0x4f7060
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0x24]
add ecx, 8
dec eax
mov dword [esp + 0x10], ecx
mov dword [esp + 0x24], eax
jne 0x4f7010
mov eax, dword [esp + 0x20]
dec eax
test eax, eax
jle 0x4f72bc
lea ecx, [esp + 0x960]
mov dword [esp + 0x10], ecx
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x10]
mov edx, dword [eax]
mov eax, dword [eax - 8]
push edx
push eax
call dword [sym.imp.SanCalc.dll_int___cdecl_min_int__int_]
mov ecx, dword [ebp + 0x14]
add esp, 8
cmp ecx, eax
jl 0x4f72a2
mov ecx, dword [esp + 0x10]
mov eax, dword [ecx + 4]
cmp eax, dword [ebp + 0x10]
jl 0x4f72a2
mov edx, dword [esp + 0x10]
sub eax, dword [edx - 4]
test eax, eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x1c], 0
jle 0x4f72a2
nop
mov esi, dword [esp + 0x10]
mov ecx, dword [esi - 8]
mov eax, dword [esi]
mov ebx, dword [esp + 0x1c]
sub eax, ecx
imul eax, ebx
cdq
idiv dword [esp + 0x34]
add eax, ecx
mov ecx, dword [esi - 4]
sub ecx, dword [ebp + 0x10]
add ecx, ebx
mov dword [esp + 0x24], ecx
js 0x4f728d
cmp dword [esp + 0x2c], ecx
jle 0x4f728d
sub eax, dword [ebp + 0xc]
push 0
push eax
call dword [sym.imp.SanCalc.dll_int___cdecl_max_int__int_]
mov edx, dword [esp + 0x18]
mov esi, eax
mov eax, dword [edx - 4]
mov ecx, ebx
lea eax, [eax + ecx + 0xc0]
cdq
mov ecx, 0xc0
idiv ecx
add esp, 8
cmp esi, edi
mov dword [esp + 0x3c], edx
jge 0x4f728d
mov edx, dword [ebp + 0xc]
lea eax, [esi + edx]
cdq
mov ecx, 0x180
idiv ecx
mov eax, edi
sub eax, esi
mov ebx, edx
mov edx, ecx
sub edx, ebx
push edx
push eax
call dword [sym.imp.SanCalc.dll_int___cdecl_min_int__int_]
mov ecx, dword [esp + 0x44]
mov edx, dword [esp + 0x2c]
add esp, 8
push ecx
mov ecx, dword [esp + 0x18]
push ebx
push 1
push eax
push edx
mov dword [esp + 0x4c], eax
mov eax, dword [ebp + 0x1c]
push esi
push eax
call fcn.0057a740
add esi, dword [esp + 0x38]
cmp esi, edi
jl 0x4f7242
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x34]
inc eax
cmp eax, ecx
mov dword [esp + 0x1c], eax
jl 0x4f71e0
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0x28]
add ecx, 8
dec eax
mov dword [esp + 0x10], ecx
mov dword [esp + 0x28], eax
jne 0x4f7195
mov ecx, dword [esp + 0x15c]
mov edx, dword [esp + 0x95c]
mov ebx, dword [ebp + 0x10]
push ecx
push edx
call dword [sym.imp.SanCalc.dll_int___cdecl_min_int__int_]
add esp, 8
cmp ebx, eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x10], ebx
jge 0x4f73c0
jmp 0x4f72f0
mov esi, dword [esp + 0x10]
mov ecx, dword [ebp + 0x10]
mov eax, esi
sub eax, ecx
mov dword [esp + 0x3c], eax
mov eax, esi
cdq
mov ecx, 0xc0
idiv ecx
mov ecx, edx
test ecx, ecx
mov dword [esp + 0x2c], ecx
jge 0x4f7333
or edx, 0xffffffff
sub edx, ecx
mov eax, 0xaaaaaaab
mul edx
shr edx, 7
lea eax, [edx + edx*2]
shl eax, 6
lea ecx, [ecx + eax + 0xc0]
mov dword [esp + 0x2c], ecx
mov edx, dword [esp + 0x34]
sub edx, esi
mov eax, 0xc0
push edx
sub eax, ecx
push eax
call dword [sym.imp.SanCalc.dll_int___cdecl_min_int__int_]
add esp, 8
xor esi, esi
test edi, edi
mov dword [esp + 0x24], eax
jle 0x4f73a3
mov ecx, dword [ebp + 0xc]
lea eax, [esi + ecx]
cdq
mov ecx, 0x180
idiv ecx
mov eax, edi
sub eax, esi
mov ebx, edx
mov edx, ecx
sub edx, ebx
push edx
push eax
call dword [sym.imp.SanCalc.dll_int___cdecl_min_int__int_]
mov ecx, dword [esp + 0x34]
mov edx, dword [esp + 0x2c]
add esp, 8
push ecx
mov ecx, dword [ebp + 0x1c]
push ebx
push edx
push eax
mov dword [esp + 0x48], eax
mov eax, dword [esp + 0x4c]
push eax
push esi
push ecx
mov ecx, dword [esp + 0x30]
call fcn.0057a740
add esi, dword [esp + 0x38]
cmp esi, edi
jl 0x4f7355
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0x24]
mov ecx, dword [esp + 0x34]
add eax, edx
cmp eax, ecx
mov dword [esp + 0x10], eax
jl 0x4f72f0
mov ebx, dword [ebp + 0x10]
mov eax, dword [esp + 0x20]
test eax, eax
jg 0x4f73d4
mov ecx, dword [esp + 0x18]
test ecx, ecx
jle 0x4f74ce
mov edx, dword [esp + 0x18]
mov ecx, dword [esp + edx*8 + 0x154]
mov edx, dword [esp + eax*8 + 0x954]
push ecx
push edx
call dword [sym.imp.SanCalc.dll_int___cdecl_max_int__int_]
mov ecx, dword [ebp + 0x18]
add esp, 8
cmp eax, ecx
mov dword [esp + 0x10], eax
jge 0x4f74ce
mov esi, dword [esp + 0x10]
mov ecx, dword [ebp + 0x10]
mov eax, esi
sub eax, ecx
mov dword [esp + 0x3c], eax
mov eax, esi
cdq
mov ecx, 0xc0
idiv ecx
mov ecx, edx
test ecx, ecx
mov dword [esp + 0x2c], ecx
jge 0x4f7443
or edx, 0xffffffff
sub edx, ecx
mov eax, 0xaaaaaaab
mul edx
shr edx, 7
lea eax, [edx + edx*2]
shl eax, 6
lea ecx, [ecx + eax + 0xc0]
mov dword [esp + 0x2c], ecx
mov edx, dword [ebp + 0x18]
sub edx, esi
mov eax, 0xc0
push edx
sub eax, ecx
push eax
call dword [sym.imp.SanCalc.dll_int___cdecl_min_int__int_]
add esp, 8
xor esi, esi
test edi, edi
mov dword [esp + 0x24], eax
jle 0x4f74b2
mov ecx, dword [ebp + 0xc]
lea eax, [esi + ecx]
cdq
mov ecx, 0x180
idiv ecx
mov eax, edi
sub eax, esi
mov ebx, edx
mov edx, ecx
sub edx, ebx
push edx
push eax
call dword [sym.imp.SanCalc.dll_int___cdecl_min_int__int_]
mov ecx, dword [esp + 0x34]
mov edx, dword [esp + 0x2c]
add esp, 8
push ecx
mov ecx, dword [ebp + 0x1c]
push ebx
push edx
push eax
mov dword [esp + 0x48], eax
mov eax, dword [esp + 0x4c]
push eax
push esi
push ecx
mov ecx, dword [esp + 0x30]
call fcn.0057a740
add esi, dword [esp + 0x38]
cmp esi, edi
jl 0x4f7464
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0x24]
mov ecx, dword [ebp + 0x18]
add eax, edx
cmp eax, ecx
mov dword [esp + 0x10], eax
jl 0x4f7400
mov ebx, dword [ebp + 0x10]
mov ecx, dword [0x11c76ac]
mov eax, ecx
shl eax, 6
cdq
sub eax, edx
mov edi, eax
mov eax, ecx
mov ecx, dword [0x11c76a8]
shl eax, 5
cdq
sub eax, edx
mov esi, eax
mov eax, ecx
shl eax, 5
cdq
sub eax, edx
sar eax, 1
mov dword [esp + 0x1c], eax
mov eax, ecx
shl eax, 6
cdq
sub eax, edx
sar eax, 1
sar esi, 1
sar edi, 1
cmp ebx, esi
mov dword [esp + 0x38], eax
mov dword [esp + 0x28], edi
mov dword [esp + 0x34], esi
mov edx, 0x2a24
mov ecx, 0x2a26
mov eax, 0x2a25
jg 0x4f7944
cmp dword [ebp + 0xc], edi
jg 0x4f7944
mov dword [esp + 0x60], edx
mov dword [esp + 0x78], edx
mov dword [esp + 0xa8], edx
mov edx, 0xfffffa00
xor edi, edi
mov dword [esp + 0xb8], edx
mov dword [esp + 0xdc], edx
mov dword [esp + 0xe8], edx
mov edx, dword [esp + 0x15c]
mov dword [esp + 0x74], edi
mov dword [esp + 0x80], edi
mov edi, 0xa0
push ebx
push edx
mov dword [esp + 0x6c], 0xfffffebe
mov dword [esp + 0x70], 0xffffff98
mov dword [esp + 0x74], ecx
mov dword [esp + 0x78], 0xfffffde8
mov dword [esp + 0x84], 0xfffffd20
mov dword [esp + 0x8c], eax
mov dword [esp + 0x90], 0xfffffdb0
mov dword [esp + 0x94], 0x78
mov dword [esp + 0x98], ecx
mov dword [esp + 0x9c], 0xfffffae0
mov dword [esp + 0xa0], edi
mov dword [esp + 0xa4], eax
mov dword [esp + 0xa8], 0xfffffbb0
mov dword [esp + 0xac], edi
mov dword [esp + 0xb4], 0xfffffc88
mov dword [esp + 0xb8], 0xd8
mov dword [esp + 0xbc], eax
mov dword [esp + 0xc4], 0xe8
mov dword [esp + 0xc8], eax
mov dword [esp + 0xcc], 0xfffffbd8
mov dword [esp + 0xd0], 0x138
mov dword [esp + 0xd4], ecx
mov dword [esp + 0xd8], 0xfffffab0
mov dword [esp + 0xdc], 0x1a8
mov dword [esp + 0xe0], ecx
mov dword [esp + 0xe8], 0x1f8
mov dword [esp + 0xec], eax
mov dword [esp + 0xf4], 0x238
call dword [sym.imp.SanCalc.dll_int___cdecl_max_int__int_]
mov edi, eax
mov eax, dword [ebp + 0x18]
push eax
push esi
call dword [sym.imp.SanCalc.dll_int___cdecl_min_int__int_]
mov dword [esp + 0x4c], eax
add edi, 0xffffff38
mov eax, 0x2aaaaaab
imul edi
sar edx, 7
mov ecx, edx
shr ecx, 0x1f
add esp, 0x10
add edx, ecx
test ebx, ebx
mov dword [esp + 0x54], edi
jge 0x4f76b0
dec edx
mov eax, dword [esp + 0x28]
lea ebx, [edx + edx*2]
lea edx, [edx + edx*2]
shl edx, 9
sub eax, edx
shl ebx, 8
mov dword [esp + 0x14], eax
cmp ebx, dword [ebp + 0x18]
mov dword [esp + 0x30], ebx
jge 0x4f7944
jmp 0x4f76e0
lea esi, [esp + 0x68]
mov dword [esp + 0x18], esi
mov dword [esp + 0x24], 0xc
mov eax, dword [esi]
mov edx, dword [esp + 0x14]
mov ecx, dword [esi - 4]
mov dword [esp + 0x44], eax
add ecx, edx
add eax, ebx
push eax
mov dword [esp + 0x24], ecx
push ecx
lea ecx, [esp + 0x60]
call fcn.004017b0
mov eax, dword [esp + 0x5c]
cmp edi, eax
jg 0x4f790b
cmp eax, dword [esp + 0x3c]
jge 0x4f790b
sub eax, dword [ebp + 0x10]
add eax, 0x190
cdq
and edx, 0xf
add eax, edx
mov esi, eax
mov eax, dword [esp + 0x40]
sar esi, 4
dec eax
push eax
lea ecx, [esi + 0xf]
push ecx
call dword [sym.imp.SanCalc.dll_int___cdecl_min_int__int_]
mov ebx, eax
mov edi, ebx
sub edi, esi
lea edx, [edi + 1]
push edx
push 1
call dword [sym.imp.SanCalc.dll_int___cdecl_max_int__int_]
mov ecx, eax
xor eax, eax
add esp, 0x10
cmp esi, ebx
mov dword [esp + 0x10], eax
jge 0x4f779a
mov edx, esi
shl edx, 4
lea edx, [esp + edx + 0x1164]
mov dword [esp + 0x2c], edi
lea ebx, [ebx]
add eax, dword [edx - 4]
cmp dword [edx], 0
je 0x4f778c
inc dword [esp + 0x10]
mov edi, dword [esp + 0x2c]
add edx, 0x10
dec edi
mov dword [esp + 0x2c], edi
jne 0x4f7780
add eax, ecx
lea eax, [eax + eax*4]
shl eax, 1
cdq
idiv ecx
mov edx, eax
mov eax, dword [esp + 0x44]
sub eax, edx
add eax, dword [esp + 0x30]
mov dword [esp + 0x44], eax
mov eax, dword [esp + 0x18]
mov edi, dword [eax - 8]
cmp edi, 0x2a20
jb 0x4f7811
cmp edi, 0x2a24
jae 0x4f7811
lea eax, [ebx + esi]
mov ebx, dword [esp + 0x10]
cdq
sub eax, edx
mov esi, eax
lea edx, [ecx + ecx]
mov eax, 0x55555556
imul edx
mov eax, edx
shr eax, 0x1f
add edx, eax
sar esi, 1
cmp edx, ebx
jl 0x4f7811
mov eax, 0x55555556
imul ecx
mov ecx, edx
shr ecx, 0x1f
add edx, ecx
cmp ebx, edx
jl 0x4f780e
shl esi, 4
mov eax, dword [esp + esi + 0x1164]
test eax, eax
jne 0x4f7811
add edi, 2
mov ecx, dword [esp + 0x48]
push edi
call fcn.004faee0
mov esi, eax
mov edx, dword [esi]
mov ecx, esi
call dword [edx + 0x1c]
mov ebx, dword [esp + 0x44]
mov edx, dword [esi]
lea eax, [eax + ebx - 1]
push eax
mov ecx, esi
call dword [edx + 0x18]
mov ecx, dword [esp + 0x24]
lea eax, [eax + ecx - 1]
push eax
push ebx
push ecx
lea ecx, [esp + 0x134]
call fcn.004edb90
lea ecx, [esp + 0x100]
call fcn.00576920
lea ecx, [esp + 0x50]
push ecx
lea edx, [esp + 0x128]
push edx
lea eax, [esp + 0x108]
push eax
lea ecx, [esp + 0x140]
mov byte [esp + 0x3170], 1
mov dword [esp + 0x5c], 0x7530
call fcn.00576bd0
test eax, eax
je 0x4f867e
mov eax, dword [esp + 0x10c]
test eax, eax
jle 0x4f867e
lea ecx, [esp + 0x100]
call fcn.0056fd90
mov eax, dword [eax + 0x1c]
cmp eax, 0x15
je 0x4f78b8
cmp eax, 0x14
jne 0x4f7890
mov ecx, esi
call fcn.00576f90
mov esi, dword [esp + 0x48]
add edi, 0xfffffff5
push edi
mov ecx, esi
call fcn.004faee0
mov ecx, dword [esp + 0x20]
push 0
push 0x1b
push 0
push 0x11170
push ebx
push ecx
push eax
mov ecx, esi
mov edx, dword [ebp + 8]
push edx
call fcn.004fbab0
lea ecx, [esp + 0x100]
mov byte [esp + 0x3164], 0
call fcn.00576940
mov esi, dword [esp + 0x18]
mov ebx, dword [esp + 0x30]
mov edi, dword [esp + 0x54]
mov eax, dword [esp + 0x24]
add esi, 0xc
dec eax
mov dword [esp + 0x18], esi
mov dword [esp + 0x24], eax
jne 0x4f76f0
mov edx, dword [esp + 0x14]
mov eax, dword [ebp + 0x18]
add ebx, 0x300
sub edx, 0x600
cmp ebx, eax
mov dword [esp + 0x14], edx
mov dword [esp + 0x30], ebx
jl 0x4f76e0
mov ecx, dword [ebp + 0x10]
cmp ecx, dword [esp + 0x1c]
mov ebx, 0x2a29
mov esi, 0x2a28
mov eax, 0x2a27
jg 0x4f7d99
mov edx, dword [esp + 0x28]
cmp edx, dword [ebp + 0x14]
jg 0x4f7d99
mov ecx, 0x78
mov dword [esp + 0x90], eax
mov dword [esp + 0xa8], eax
mov dword [esp + 0xe4], eax
mov eax, dword [ebp + 0x10]
mov dword [esp + 0x80], ecx
mov dword [esp + 0x8c], ecx
mov ecx, dword [esp + 0x95c]
push eax
push ecx
mov dword [esp + 0x68], ebx
mov dword [esp + 0x6c], 0x4b0
mov dword [esp + 0x70], 0x28
mov dword [esp + 0x74], ebx
mov dword [esp + 0x78], 0xa4
mov dword [esp + 0x7c], 0x32
mov dword [esp + 0x80], esi
mov dword [esp + 0x84], 0x120
mov dword [esp + 0x8c], esi
mov dword [esp + 0x90], 0x370
mov dword [esp + 0x9c], 0x1c8
mov dword [esp + 0xa0], 0xc8
mov dword [esp + 0xa4], ebx
mov dword [esp + 0xa8], 0x2d0
mov dword [esp + 0xac], 0x140
mov dword [esp + 0xb4], 0x498
mov dword [esp + 0xb8], 0x150
mov dword [esp + 0xbc], ebx
mov dword [esp + 0xc0], 0x3a8
mov dword [esp + 0xc4], 0x1a8
mov dword [esp + 0xc8], esi
mov dword [esp + 0xcc], 0x448
mov dword [esp + 0xd0], 0x1f0
mov dword [esp + 0xd4], esi
mov dword [esp + 0xd8], 0x4b8
mov dword [esp + 0xdc], 0x238
mov dword [esp + 0xe0], esi
mov dword [esp + 0xe4], 0x550
mov dword [esp + 0xe8], 0x268
mov dword [esp + 0xf0], 0x5d0
mov dword [esp + 0xf4], 0x2b8
call dword [sym.imp.SanCalc.dll_int___cdecl_max_int__int_]
mov edx, dword [ebp + 0x18]
mov edi, eax
mov eax, dword [esp + 0x24]
push edx
push eax
call dword [sym.imp.SanCalc.dll_int___cdecl_min_int__int_]
mov dword [esp + 0x60], eax
lea ecx, [edi - 0xc8]
mov eax, 0x2aaaaaab
imul ecx
mov eax, dword [ebp + 0x10]
sar edx, 7
mov dword [esp + 0x64], ecx
mov ecx, edx
shr ecx, 0x1f
add esp, 0x10
add edx, ecx
test eax, eax
jge 0x4f7b01
dec edx
lea eax, [edx + edx*2]
lea ecx, [edx + edx*2]
mov edx, dword [esp + 0x28]
shl eax, 9
add eax, edx
shl ecx, 8
mov dword [esp + 0x18], eax
cmp ecx, dword [ebp + 0x18]
mov dword [esp + 0x10], ecx
jge 0x4f7d99
jmp 0x4f7b30
lea edi, [esp + 0x68]
mov dword [esp + 0x20], edi
mov dword [esp + 0x24], 0xc
mov edx, dword [edi - 4]
mov ecx, dword [esp + 0x18]
mov eax, dword [edi]
add ecx, edx
mov edx, dword [esp + 0x10]
mov dword [esp + 0x44], eax
add eax, edx
push eax
mov dword [esp + 0x34], ecx
push ecx
lea ecx, [esp + 0x60]
call fcn.004017b0
mov eax, dword [esp + 0x5c]
cmp dword [esp + 0x54], eax
jg 0x4f7d5d
cmp eax, dword [esp + 0x50]
jge 0x4f7d5d
sub eax, dword [ebp + 0x10]
add eax, 0x190
cdq
and edx, 0xf
add eax, edx
mov esi, eax
mov eax, dword [esp + 0x4c]
sar esi, 4
dec eax
push eax
lea ecx, [esi + 0xf]
push ecx
call dword [sym.imp.SanCalc.dll_int___cdecl_min_int__int_]
mov ebx, eax
mov edi, ebx
sub edi, esi
lea edx, [edi + 1]
push edx
push 1
call dword [sym.imp.SanCalc.dll_int___cdecl_max_int__int_]
mov ecx, eax
xor eax, eax
add esp, 0x10
cmp esi, ebx
mov dword [esp + 0x28], eax
jge 0x4f7bea
mov edx, esi
shl edx, 4
lea edx, [esp + edx + 0x2164]
mov dword [esp + 0x2c], edi
add eax, dword [edx - 4]
cmp dword [edx], 0
je 0x4f7bdc
inc dword [esp + 0x28]
mov edi, dword [esp + 0x2c]
add edx, 0x10
dec edi
mov dword [esp + 0x2c], edi
jne 0x4f7bd0
add eax, ecx
lea eax, [eax + eax*4]
shl eax, 1
cdq
idiv ecx
mov edx, eax
mov eax, dword [esp + 0x44]
sub eax, edx
add eax, dword [esp + 0x10]
mov dword [esp + 0x44], eax
mov eax, dword [esp + 0x20]
mov edi, dword [eax - 8]
cmp edi, 0x2a20
jb 0x4f7c61
cmp edi, 0x2a24
jae 0x4f7c61
lea eax, [ebx + esi]
mov ebx, dword [esp + 0x28]
cdq
sub eax, edx
mov esi, eax
lea edx, [ecx + ecx]
mov eax, 0x55555556
imul edx
mov eax, edx
shr eax, 0x1f
add edx, eax
sar esi, 1
cmp edx, ebx
jl 0x4f7c61
mov eax, 0x55555556
imul ecx
mov ecx, edx
shr ecx, 0x1f
add edx, ecx
cmp ebx, edx
jl 0x4f7c5e
shl esi, 4
mov eax, dword [esp + esi + 0x1164]
test eax, eax
jne 0x4f7c61
add edi, 2
mov ecx, dword [esp + 0x48]
push edi
call fcn.004faee0
mov esi, eax
mov edx, dword [esi]
mov ecx, esi
call dword [edx + 0x1c]
mov ebx, dword [esp + 0x44]
mov edx, dword [esi]
lea eax, [eax + ebx - 1]
push eax
mov ecx, esi
call dword [edx + 0x18]
mov ecx, dword [esp + 0x34]
lea eax, [eax + ecx - 1]
push eax
push ebx
push ecx
lea ecx, [esp + 0x134]
call fcn.004edb90
lea ecx, [esp + 0x100]
call fcn.00576920
lea ecx, [esp + 0x3c]
push ecx
lea edx, [esp + 0x128]
push edx
lea eax, [esp + 0x108]
push eax
lea ecx, [esp + 0x140]
mov byte [esp + 0x3170], 2
mov dword [esp + 0x48], 0x7530
call fcn.00576bd0
test eax, eax
je 0x4f8699
mov eax, dword [esp + 0x10c]
test eax, eax
jle 0x4f8699
lea ecx, [esp + 0x100]
call fcn.0056fd90
mov eax, dword [eax + 0x1c]
cmp eax, 0x15
je 0x4f7d08
cmp eax, 0x14
jne 0x4f7ce0
mov ecx, esi
call fcn.00576f90
mov esi, dword [esp + 0x48]
add edi, 0xfffffff5
push edi
mov ecx, esi
call fcn.004faee0
mov ecx, dword [esp + 0x30]
push 0
push 0x1b
push 0
push 0x11170
push ebx
push ecx
push eax
mov ecx, esi
mov edx, dword [ebp + 8]
push edx
call fcn.004fbab0
lea ecx, [esp + 0x100]
mov byte [esp + 0x3164], 0
call fcn.00576940
mov edi, dword [esp + 0x20]
mov esi, 0x2a28
mov ebx, 0x2a29
mov eax, dword [esp + 0x24]
add edi, 0xc
dec eax
mov dword [esp + 0x20], edi
mov dword [esp + 0x24], eax
jne 0x4f7b40
mov eax, dword [esp + 0x10]
mov edi, dword [esp + 0x18]
mov ecx, dword [ebp + 0x18]
add eax, 0x300
add edi, 0x600
cmp eax, ecx
mov dword [esp + 0x18], edi
mov dword [esp + 0x10], eax
jl 0x4f7b30
mov eax, dword [esp + 0x34]
cmp eax, dword [ebp + 0x18]
jg 0x4f81d0
mov ecx, dword [ebp + 0xc]
cmp ecx, dword [esp + 0x38]
jg 0x4f81d0
mov edx, dword [ebp + 0x10]
mov edi, dword [esp + 0x34]
mov ecx, 0x2a27
mov eax, 0x168
push edx
push edi
mov dword [esp + 0x68], ebx
mov dword [esp + 0x6c], 8
mov dword [esp + 0x70], 0
mov dword [esp + 0x74], esi
mov dword [esp + 0x78], 0xe8
mov dword [esp + 0x7c], 0x78
mov dword [esp + 0x80], ecx
mov dword [esp + 0x84], 0x190
mov dword [esp + 0x88], 0xd0
mov dword [esp + 0x8c], ebx
mov dword [esp + 0x90], 0x10
mov dword [esp + 0x94], 0xd8
mov dword [esp + 0x98], ebx
mov dword [esp + 0x9c], 0x260
mov dword [esp + 0xa0], 0x148
mov dword [esp + 0xa4], esi
mov dword [esp + 0xa8], eax
mov dword [esp + 0xac], eax
mov dword [esp + 0xb0], esi
mov dword [esp + 0xb4], 0x318
mov dword [esp + 0xb8], 0x178
mov dword [esp + 0xbc], esi
mov dword [esp + 0xc0], 0x370
mov dword [esp + 0xc4], 0x1cc
mov dword [esp + 0xc8], ebx
mov dword [esp + 0xcc], 0x408
mov dword [esp + 0xd0], 0x218
mov dword [esp + 0xd4], ecx
mov dword [esp + 0xd8], 0xf0
mov dword [esp + 0xdc], 0x230
mov dword [esp + 0xe0], ecx
mov dword [esp + 0xe4], 0x4b8
mov dword [esp + 0xe8], 0x268
mov dword [esp + 0xec], esi
mov dword [esp + 0xf0], 0x580
mov dword [esp + 0xf4], 0x2b0
call dword [sym.imp.SanCalc.dll_int___cdecl_max_int__int_]
mov ebx, dword [ebp + 0x18]
mov esi, eax
mov eax, dword [esp + 0x50]
mov ecx, dword [eax + 0x164]
push ebx
push ecx
call dword [sym.imp.SanCalc.dll_int___cdecl_min_int__int_]
lea ecx, [esi - 0xc8]
mov dword [esp + 0x60], eax
mov dword [esp + 0x64], ecx
sub ecx, edi
mov eax, 0x2aaaaaab
imul ecx
sar edx, 7
mov eax, edx
shr eax, 0x1f
add edx, eax
lea esi, [edx + edx*2]
shl esi, 8
add esi, edi
lea edi, [edx + edx*2]
shl edi, 9
add esp, 0x10
cmp esi, ebx
mov dword [esp + 0x18], esi
mov dword [esp + 0x14], edi
jge 0x4f81d0
jmp 0x4f7f70
lea ebx, [esp + 0x68]
mov dword [esp + 0x20], ebx
mov dword [esp + 0x24], 0xc
mov eax, dword [ebx]
mov ecx, dword [ebx - 4]
mov dword [esp + 0x44], eax
add ecx, edi
add eax, esi
push eax
mov dword [esp + 0x34], ecx
push ecx
lea ecx, [esp + 0x60]
call fcn.004017b0
mov eax, dword [esp + 0x5c]
cmp dword [esp + 0x54], eax
jg 0x4f819b
cmp eax, dword [esp + 0x50]
jge 0x4f819b
sub eax, dword [ebp + 0x10]
cdq
and edx, 0xf
add eax, edx
mov edx, dword [esp + 0x40]
mov esi, eax
sar esi, 4
dec edx
push edx
lea eax, [esi + 0xf]
push eax
call dword [sym.imp.SanCalc.dll_int___cdecl_min_int__int_]
mov ebx, eax
mov edi, ebx
sub edi, esi
lea ecx, [edi + 1]
push ecx
push 1
call dword [sym.imp.SanCalc.dll_int___cdecl_max_int__int_]
mov ecx, eax
xor eax, eax
add esp, 0x10
cmp esi, ebx
mov dword [esp + 0x28], eax
jge 0x4f801d
mov edx, esi
shl edx, 4
lea edx, [esp + edx + 0x1164]
mov dword [esp + 0x2c], edi
add eax, dword [edx - 4]
cmp dword [edx], 0
je 0x4f800f
inc dword [esp + 0x28]
mov edi, dword [esp + 0x2c]
add edx, 0x10
dec edi
mov dword [esp + 0x2c], edi
jne 0x4f8003
add eax, ecx
lea eax, [eax + eax*4]
shl eax, 1
cdq
idiv ecx
mov edx, eax
mov eax, dword [esp + 0x44]
sub eax, edx
add eax, dword [esp + 0x18]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x20]
mov edi, dword [eax - 8]
cmp edi, 0x2a20
jb 0x4f8094
cmp edi, 0x2a24
jae 0x4f8094
lea eax, [ebx + esi]
mov ebx, dword [esp + 0x28]
cdq
sub eax, edx
mov esi, eax
lea edx, [ecx + ecx]
mov eax, 0x55555556
imul edx
mov eax, edx
shr eax, 0x1f
add edx, eax
sar esi, 1
cmp edx, ebx
jl 0x4f8094
mov eax, 0x55555556
imul ecx
mov ecx, edx
shr ecx, 0x1f
add edx, ecx
cmp ebx, edx
jl 0x4f8091
shl esi, 4
mov eax, dword [esp + esi + 0x1164]
test eax, eax
jne 0x4f8094
add edi, 2
mov ebx, dword [esp + 0x48]
push edi
mov ecx, ebx
call fcn.004faee0
mov esi, eax
mov edx, dword [esi]
mov ecx, esi
call dword [edx + 0x1c]
mov ecx, dword [esp + 0x10]
lea edx, [eax + ecx - 1]
mov eax, dword [esi]
push edx
mov ecx, esi
call dword [eax + 0x18]
mov ecx, dword [esp + 0x34]
lea edx, [eax + ecx - 1]
mov eax, dword [esp + 0x14]
push edx
push eax
push ecx
lea ecx, [esp + 0x134]
call fcn.004edb90
lea ecx, [esp + 0x100]
call fcn.00576920
lea ecx, [esp + 0x3c]
push ecx
lea edx, [esp + 0x128]
push edx
lea eax, [esp + 0x108]
push eax
lea ecx, [esp + 0x140]
mov byte [esp + 0x3170], 3
mov dword [esp + 0x48], 0x7530
call fcn.00576bd0
test eax, eax
je 0x4f86b4
lea esp, [esp]
mov eax, dword [esp + 0x10c]
test eax, eax
jle 0x4f86b4
lea ecx, [esp + 0x100]
call fcn.0056fd90
mov eax, dword [eax + 0x1c]
cmp eax, 0x15
je 0x4f8148
cmp eax, 0x14
jne 0x4f8120
mov ecx, esi
call fcn.00576f90
add edi, 0xfffffff5
push edi
mov ecx, ebx
call fcn.004faee0
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x30]
push 0
push 0x1b
push 0
push 0x11170
push ecx
push edx
push eax
mov eax, dword [ebp + 8]
mov ecx, ebx
push eax
call fcn.004fbab0
lea ecx, [esp + 0x100]
mov byte [esp + 0x3164], 0
call fcn.00576940
mov edi, dword [esp + 0x14]
mov esi, dword [esp + 0x18]
mov ebx, dword [esp + 0x20]
mov eax, dword [esp + 0x24]
add ebx, 0xc
dec eax
mov dword [esp + 0x20], ebx
mov dword [esp + 0x24], eax
jne 0x4f7f80
mov eax, dword [ebp + 0x18]
add esi, 0x300
add edi, 0x600
cmp esi, eax
mov dword [esp + 0x14], edi
mov dword [esp + 0x18], esi
jl 0x4f7f70
mov ecx, dword [ebp + 0x18]
cmp dword [esp + 0x1c], ecx
jg 0x4f8650
mov edx, dword [ebp + 0x14]
cmp dword [esp + 0x38], edx
jg 0x4f8650
mov edi, dword [esp + 0x1c]
mov eax, 0x2a25
mov dword [esp + 0x60], eax
mov dword [esp + 0x84], eax
mov dword [esp + 0xb4], eax
mov dword [esp + 0xd8], eax
mov dword [esp + 0xf0], eax
mov eax, dword [ebp + 0x10]
mov ecx, 0x2a24
mov edx, 0x2a26
push eax
mov esi, 0xfffffb98
push edi
mov dword [esp + 0x6c], 0xffffffd0
mov dword [esp + 0x70], 0xffffff80
mov dword [esp + 0x74], ecx
mov dword [esp + 0x78], 0xfffffeb8
mov dword [esp + 0x7c], 0xffffffd8
mov dword [esp + 0x80], edx
mov dword [esp + 0x84], 0xfffffe30
mov dword [esp + 0x88], 0x38
mov dword [esp + 0x90], 0xfffffdd8
mov dword [esp + 0x94], 0x88
mov dword [esp + 0x98], ecx
mov dword [esp + 0x9c], 0xfffffcd8
mov dword [esp + 0xa0], 0xe8
mov dword [esp + 0xa4], edx
mov dword [esp + 0xa8], 0xfffffc68
mov dword [esp + 0xac], 0x120
mov dword [esp + 0xb0], ecx
mov dword [esp + 0xb4], esi
mov dword [esp + 0xb8], 0x188
mov dword [esp + 0xc0], esi
mov dword [esp + 0xc4], 0x19c
mov dword [esp + 0xc8], edx
mov dword [esp + 0xcc], 0xfffffc70
mov dword [esp + 0xd0], 0x1a8
mov dword [esp + 0xd4], ecx
mov dword [esp + 0xd8], 0xfffffe60
mov dword [esp + 0xdc], 0x1b8
mov dword [esp + 0xe4], 0xfffffb10
mov dword [esp + 0xe8], 0x1f8
mov dword [esp + 0xec], edx
mov dword [esp + 0xf0], 0xfffffa48
mov dword [esp + 0xf4], 0x228
mov dword [esp + 0xfc], 0xfffffbb8
mov dword [esp + 0x100], 0x278
call dword [sym.imp.SanCalc.dll_int___cdecl_max_int__int_]
mov ecx, dword [esp + 0x50]
mov ebx, dword [ebp + 0x18]
mov edx, dword [ecx + 0x164]
push ebx
push edx
mov esi, eax
call dword [sym.imp.SanCalc.dll_int___cdecl_min_int__int_]
lea ecx, [esi - 0xc8]
mov dword [esp + 0x60], eax
mov dword [esp + 0x64], ecx
sub ecx, edi
mov eax, 0x2aaaaaab
imul ecx
sar edx, 7
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, dword [esp + 0x44]
lea esi, [edx + edx*2]
lea ecx, [edx + edx*2]
mov edx, dword [esp + 0x58]
mov edi, dword [edx + 0x160]
shl esi, 8
shl ecx, 9
add esi, eax
sub edi, ecx
add esp, 0x10
cmp esi, ebx
mov dword [esp + 0x10], esi
mov dword [esp + 0x24], edi
jge 0x4f8650
jmp 0x4f83e0
lea ebx, [esp + 0x68]
mov dword [esp + 0x30], ebx
mov dword [esp + 0x2c], 0xd
mov eax, dword [ebx]
mov ecx, dword [ebx - 4]
mov dword [esp + 0x44], eax
add ecx, edi
add eax, esi
push eax
mov dword [esp + 0x2c], ecx
push ecx
lea ecx, [esp + 0x60]
call fcn.004017b0
mov eax, dword [esp + 0x5c]
cmp dword [esp + 0x54], eax
jg 0x4f861b
cmp eax, dword [esp + 0x50]
jge 0x4f861b
sub eax, dword [ebp + 0x10]
cdq
and edx, 0xf
add eax, edx
mov edx, dword [esp + 0x4c]
mov esi, eax
sar esi, 4
dec edx
push edx
lea eax, [esi + 0xf]
push eax
call dword [sym.imp.SanCalc.dll_int___cdecl_min_int__int_]
push esi
push 0
mov ebx, eax
call dword [sym.imp.SanCalc.dll_int___cdecl_max_int__int_]
mov edi, eax
mov esi, ebx
sub esi, edi
lea ecx, [esi + 1]
push ecx
push 1
call dword [sym.imp.SanCalc.dll_int___cdecl_max_int__int_]
mov ecx, eax
xor eax, eax
add esp, 0x18
cmp edi, ebx
mov dword [esp + 0x34], eax
jge 0x4f849a
mov edx, edi
shl edx, 4
lea edx, [esp + edx + 0x2164]
mov dword [esp + 0x38], esi
mov edi, edi
add eax, dword [edx - 4]
cmp dword [edx], 0
je 0x4f848c
inc dword [esp + 0x34]
mov esi, dword [esp + 0x38]
add edx, 0x10
dec esi
mov dword [esp + 0x38], esi
jne 0x4f8480
add eax, ecx
lea eax, [eax + eax*4]
shl eax, 1
cdq
idiv ecx
mov edx, eax
mov eax, dword [esp + 0x44]
sub eax, edx
add eax, dword [esp + 0x10]
mov dword [esp + 0x44], eax
mov eax, dword [esp + 0x30]
mov esi, dword [eax - 8]
cmp esi, 0x2a20
mov dword [esp + 0x40], esi
jb 0x4f8519
cmp esi, 0x2a24
jae 0x4f8519
lea eax, [ebx + edi]
mov ebx, dword [esp + 0x34]
cdq
sub eax, edx
mov edi, eax
lea edx, [ecx + ecx]
mov eax, 0x55555556
imul edx
mov eax, edx
shr eax, 0x1f
add edx, eax
sar edi, 1
cmp edx, ebx
jl 0x4f8519
mov eax, 0x55555556
imul ecx
mov ecx, edx
shr ecx, 0x1f
add edx, ecx
cmp ebx, edx
jl 0x4f8512
shl edi, 4
mov eax, dword [esp + edi + 0x1164]
test eax, eax
jne 0x4f8519
add esi, 2
mov dword [esp + 0x40], esi
mov edx, dword [esp + 0x40]
mov edi, dword [esp + 0x48]
push edx
mov ecx, edi
call fcn.004faee0
mov esi, eax
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x1c]
mov ebx, dword [esp + 0x44]
mov edx, dword [esi]
lea ecx, [eax + ebx - 1]
push ecx
mov ecx, esi
call dword [edx + 0x18]
mov ecx, dword [esp + 0x2c]
lea eax, [eax + ecx - 1]
push eax
push ebx
push ecx
lea ecx, [esp + 0x134]
call fcn.004edb90
lea ecx, [esp + 0x100]
call fcn.00576920
lea ecx, [esp + 0x3c]
push ecx
lea edx, [esp + 0x128]
push edx
lea eax, [esp + 0x108]
push eax
lea ecx, [esp + 0x140]
mov byte [esp + 0x3170], 4
mov dword [esp + 0x48], 0x7530
call fcn.00576bd0
test eax, eax
je 0x4f86cf
mov edi, edi
mov eax, dword [esp + 0x10c]
test eax, eax
jle 0x4f86cf
lea ecx, [esp + 0x100]
call fcn.0056fd90
mov eax, dword [eax + 0x1c]
cmp eax, 0x15
je 0x4f85c8
cmp eax, 0x14
jne 0x4f85a0
mov ecx, esi
call fcn.00576f90
mov eax, dword [esp + 0x40]
add eax, 0xfffffff5
push eax
mov ecx, edi
call fcn.004faee0
mov ecx, dword [esp + 0x28]
push 0
push 0x1b
push 0
push 0x11170
push ebx
push ecx
push eax
mov edx, dword [ebp + 8]
mov ecx, edi
push edx
call fcn.004fbab0
lea ecx, [esp + 0x100]
mov byte [esp + 0x3164], 0
call fcn.00576940
mov esi, dword [esp + 0x10]
mov edi, dword [esp + 0x24]
mov ebx, dword [esp + 0x30]
mov eax, dword [esp + 0x2c]
add ebx, 0xc
dec eax
mov dword [esp + 0x30], ebx
mov dword [esp + 0x2c], eax
jne 0x4f83f0
mov eax, dword [ebp + 0x18]
add esi, 0x300
sub edi, 0x600
cmp esi, eax
mov dword [esp + 0x24], edi
mov dword [esp + 0x10], esi
jl 0x4f83e0
lea ecx, [esp + 0x134]
mov dword [esp + 0x3164], 0xffffffff
call fcn.00576940
mov ecx, dword [esp + 0x315c]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 0x18
mov ecx, dword [esp + 0x20]
push 0
push 0x1b
push 0
push 0x11170
push ebx
push ecx
mov ecx, dword [esp + 0x60]
push esi
jmp 0x4f78e2
mov ecx, dword [esp + 0x30]
push 0
push 0x1b
push 0
push 0x11170
push ebx
push ecx
mov ecx, dword [esp + 0x60]
push esi
jmp 0x4f7d32
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x30]
push 0
push 0x1b
push 0
push 0x11170
push ecx
push edx
push esi
jmp 0x4f8170
mov ecx, dword [esp + 0x28]
push 0
push 0x1b
push 0
push 0x11170
push ebx
push ecx
push esi
jmp 0x4f85f0