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

Disassembly:
mov eax, 0x4064
call fcn.005322e0
push ebx
push ebp
mov ebp, dword [esp + 0x4078]
push esi
cmp ebp, 3
push edi
mov esi, ecx
jl 0x4a2caf
mov eax, dword [esp + 0x4084]
cmp eax, 3
jl 0x4a2caf
movsx ebx, word [esi + 6]
lea ecx, [eax - 1]
mov eax, ebx
cdq
dec ebp
sub eax, edx
mov edx, dword [esp + 0x4078]
sar ebp, 1
add edx, ebp
mov dword [esp + 0x10], edx
mov edx, dword [esp + 0x407c]
sar ecx, 1
add edx, ecx
mov dword [esp + 0x18], edx
xor edx, edx
sar eax, 1
cmp word [esi + 4], dx
mov dword [esp + 0x38], eax
jne 0x4a1cde
mov edx, 1
sub edx, eax
lea edi, [esp + 0x78]
mov dword [esp + 0x74], 0
lea eax, [edx + ecx]
mov ecx, 0xfff
mov dword [esp + 0x3c], eax
xor eax, eax
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x3c]
add edx, ebp
push ecx
push edx
lea edx, [esp + 0x7c]
push edx
call fcn.004a71b0
mov eax, dword [esp + 0x48]
add esp, 0xc
mov eax, dword [esp + eax*4 + 0x78]
cmp eax, 1
mov dword [esp + 0x14], eax
jg 0x4a1d2a
mov dword [esp + 0x14], 1
mov ecx, dword [esp + 0x4084]
mov edx, dword [esp + 0x4080]
mov eax, dword [esp + 0x407c]
push ecx
mov ecx, dword [esp + 0x407c]
push edx
push eax
push ecx
lea ecx, [esp + 0x7c]
call fcn.004c9320
mov eax, dword [esp + 0x4088]
mov dx, word [eax]
cmp dx, word [eax + 4]
jg 0x4a1d7a
mov cx, word [eax + 2]
cmp cx, word [eax + 6]
jg 0x4a1d7a
mov edx, dword [eax]
mov eax, dword [eax + 4]
mov dword [esp + 0x6c], edx
mov dword [esp + 0x70], eax
mov eax, dword [esi + 0xc]
test eax, eax
je 0x4a1dff
mov eax, dword [esp + 0x3c]
xor ebp, ebp
test eax, eax
jle 0x4a1dff
mov ecx, dword [esp + 0x18]
lea edi, [esp + 0x74]
mov dword [esp + 0x24], ecx
mov edx, dword [esp + 0x408c]
mov eax, dword [edi]
lea ecx, [esp + 0x6c]
push edx
push ecx
mov ecx, dword [esp + 0x20]
lea edx, [eax + eax - 1]
push edx
lea edx, [ecx + ebp]
mov ecx, dword [esp + 0x1c]
push edx
sub ecx, eax
inc ecx
push ecx
mov ecx, esi
call fcn.004a6320
mov eax, dword [edi]
mov edx, dword [esp + 0x408c]
push edx
lea ecx, [esp + 0x70]
lea edx, [eax + eax - 1]
push ecx
mov ecx, dword [esp + 0x2c]
push edx
mov edx, dword [esp + 0x1c]
push ecx
sub edx, eax
mov ecx, esi
inc edx
push edx
call fcn.004a6320
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x3c]
inc ebp
dec edx
add edi, 4
cmp ebp, eax
mov dword [esp + 0x24], edx
jl 0x4a1d97
mov al, byte [esi + 4]
and eax, 0xf
mov edi, eax
je 0x4a2caf
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x10]
sub ecx, eax
sub edx, eax
mov dword [esp + 0x18], ecx
mov ecx, esi
mov dword [esp + 0x10], edx
call fcn.004a4c20
cmp edi, 1
jne 0x4a1f1e
cmp ebx, edi
jle 0x4a1eb1
mov ebp, dword [esp + 0x14]
xor edi, edi
test ebp, ebp
jle 0x4a1e64
lea ebx, [esp + 0x74]
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x10]
mov eax, dword [ebx]
push ecx
push edx
push edi
push eax
mov ecx, esi
call fcn.004a7470
inc edi
add ebx, 4
cmp edi, ebp
jl 0x4a1e47
cmp edi, dword [esp + 0x3c]
jg 0x4a2caf
lea ebp, [esp + edi*4 + 0x74]
mov ebx, dword [ebp - 4]
mov ecx, dword [ebp]
sub ebx, ecx
dec ebx
js 0x4a1e98
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x10]
mov eax, dword [ebp]
push ecx
push edx
add eax, ebx
push edi
push eax
mov ecx, esi
call fcn.004a7470
dec ebx
jns 0x4a1e7d
mov eax, dword [esp + 0x3c]
inc edi
add ebp, 4
cmp edi, eax
jle 0x4a1e72
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4064
ret 0x18
mov ebp, dword [esp + 0x14]
xor edi, edi
test ebp, ebp
jle 0x4a1ede
lea ebx, [esp + 0x74]
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x10]
mov eax, dword [ebx]
push 1
push ecx
push edx
push edi
push eax
mov ecx, esi
call fcn.004a73a0
inc edi
add ebx, 4
cmp edi, ebp
jl 0x4a1ebf
mov ebp, dword [esp + 0x3c]
cmp edi, ebp
jg 0x4a2caf
lea ebx, [esp + edi*4 + 0x74]
mov eax, dword [ebx]
mov ecx, dword [ebx - 4]
mov edx, dword [esp + 0x18]
sub ecx, eax
push ecx
mov ecx, dword [esp + 0x14]
push edx
push ecx
push edi
push eax
mov ecx, esi
call fcn.004a73a0
inc edi
add ebx, 4
cmp edi, ebp
jle 0x4a1eee
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4064
ret 0x18
mov edi, dword [esp + 0x14]
mov ecx, dword [esp + 0x3c]
cmp edi, ecx
jg 0x4a1f40
sub ecx, edi
lea eax, [esp + edi*4 + 0x74]
inc ecx
mov edx, dword [eax - 4]
mov ebp, dword [eax]
sub edx, ebp
add eax, 4
add edi, edx
dec ecx
jne 0x4a1f31
mov ecx, esi
call fcn.004a4bc0
mov ebp, eax
cmp ebx, 1
mov dword [esp + 0x20], ebp
jle 0x4a29b9
lea eax, [edi + edi]
xor edx, edx
div ebx
xor edx, edx
xor ecx, ecx
mov dword [esp + 0x40], ecx
mov dword [esp + 0x20], ecx
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], eax
lea eax, [edi*4]
div ebx
mov edx, dword [esp + 0x14]
mov dword [esp + 0x4c], eax
xor eax, eax
cmp edx, ecx
mov dword [esp + 0x1c], eax
jle 0x4a2482
lea edi, [esp + 0x74]
mov dword [esp + 0x24], edi
mov ecx, dword [esp + 0x20]
test ecx, ecx
jne 0x4a2297
mov edi, dword [esp + 0x40]
xor edx, edx
mov eax, edi
mov ecx, 0x18
div ecx
mov eax, dword [esp + 0x44]
mov ecx, dword [edx*4 + 0x67a8e4]
xor edx, edx
and ecx, ebp
inc edi
mov dword [esp + 0x40], edi
mov edi, 0x18
div edi
mov edi, dword [esp + 0x44]
mov dword [esp + 0x28], ecx
mov eax, dword [edx*4 + 0x67a8e4]
xor edx, edx
and eax, ebp
dec edi
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x48]
mov dword [esp + 0x44], edi
mov edi, 0x18
div edi
mov eax, dword [edx*4 + 0x67a8e4]
xor edx, edx
and eax, ebp
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x48]
inc eax
mov dword [esp + 0x48], eax
mov eax, dword [esp + 0x4c]
div edi
mov eax, dword [edx*4 + 0x67a8e4]
mov edx, dword [esp + 0x4c]
and eax, ebp
dec edx
test ecx, ecx
mov dword [esp + 0x34], eax
mov dword [esp + 0x4c], edx
je 0x4a20bf
mov edx, dword [esp + 0x24]
mov ecx, dword [esp + 0x10]
mov eax, dword [edx]
mov edx, dword [esp + 0x18]
add eax, ecx
mov ecx, dword [esp + 0x1c]
mov word [esp + 0x68], ax
mov al, byte [0x943a3d]
add ecx, edx
test al, 1
mov word [esp + 0x6a], cx
jne 0x4a2084
mov dl, al
xor edi, edi
or dl, 1
push fcn.00458ab0
mov byte [0x943a3d], dl
mov word [0x9660fc], di
mov word [0x9660fe], di
call fcn.0053228e
add esp, 4
jmp 0x4a2086
xor edi, edi
mov ecx, dword [esi + 0x1c]
mov edx, dword [esi + 0x20]
push edi
push 1
push ebx
lea eax, [esp + 0x74]
push ebx
push eax
push 0x9660fc
push ecx
push edx
call fcn.0047d2c0
mov eax, dword [esp + 0x60]
xor edx, edx
mov ecx, 0x18
add esp, 0x20
div ecx
test dword [edx*4 + 0x67a8e4], ebp
jne 0x4a20bf
mov dword [esp + 0x28], edi
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x4a215b
mov edx, dword [esp + 0x24]
mov ecx, dword [esp + 0x10]
mov edi, dword [esp + 0x1c]
mov eax, dword [edx]
mov edx, dword [esp + 0x18]
sub ecx, eax
lea eax, [edi + edx]
mov word [esp + 0x54], cx
mov word [esp + 0x56], ax
mov al, byte [0x943a3d]
test al, 1
jne 0x4a211b
mov dl, al
xor eax, eax
or dl, 1
push fcn.00458ab0
mov byte [0x943a3d], dl
mov word [0x9660fc], ax
mov word [0x9660fe], ax
call fcn.0053228e
add esp, 4
mov edx, dword [esi + 0x1c]
mov eax, dword [esi + 0x20]
push 0
push 1
push ebx
lea ecx, [esp + 0x60]
push ebx
push ecx
push 0x9660fc
push edx
push eax
call fcn.0047d2c0
mov eax, dword [esp + 0x64]
xor edx, edx
mov ecx, 0x18
add esp, 0x20
div ecx
test dword [edx*4 + 0x67a8e4], ebp
jne 0x4a215f
mov dword [esp + 0x2c], 0
jmp 0x4a215f
mov edi, dword [esp + 0x1c]
mov eax, dword [esp + 0x30]
test eax, eax
je 0x4a21f4
mov edx, dword [esp + 0x24]
mov ecx, dword [esp + 0x10]
mov eax, dword [edx]
mov edx, dword [esp + 0x18]
sub ecx, eax
mov al, byte [0x943a3d]
sub edx, edi
mov word [esp + 0x50], cx
test al, 1
mov word [esp + 0x52], dx
jne 0x4a21b6
mov dl, al
xor eax, eax
or dl, 1
push fcn.00458ab0
mov byte [0x943a3d], dl
mov word [0x9660fc], ax
mov word [0x9660fe], ax
call fcn.0053228e
add esp, 4
mov ecx, dword [esi + 0x1c]
mov edx, dword [esi + 0x20]
push 0
push 1
push ebx
lea eax, [esp + 0x5c]
push ebx
push eax
push 0x9660fc
push ecx
push edx
call fcn.0047d2c0
mov eax, dword [esp + 0x68]
xor edx, edx
mov ecx, 0x18
add esp, 0x20
div ecx
test dword [edx*4 + 0x67a8e4], ebp
jne 0x4a21f4
mov dword [esp + 0x30], 0
mov eax, dword [esp + 0x34]
test eax, eax
je 0x4a228a
mov edx, dword [esp + 0x24]
mov ecx, dword [esp + 0x10]
mov eax, dword [edx]
add eax, ecx
mov ecx, dword [esp + 0x18]
mov word [esp + 0x5c], ax
mov al, byte [0x943a3d]
sub ecx, edi
test al, 1
mov word [esp + 0x5e], cx
jne 0x4a224f
mov dl, al
xor edi, edi
or dl, 1
push fcn.00458ab0
mov byte [0x943a3d], dl
mov word [0x9660fc], di
mov word [0x9660fe], di
call fcn.0053228e
add esp, 4
jmp 0x4a2251
xor edi, edi
mov eax, dword [esi + 0x1c]
mov ecx, dword [esi + 0x20]
push edi
push 1
push ebx
lea edx, [esp + 0x68]
push ebx
push edx
push 0x9660fc
push eax
push ecx
call fcn.0047d2c0
mov eax, dword [esp + 0x6c]
xor edx, edx
mov ecx, 0x18
add esp, 0x20
div ecx
test dword [edx*4 + 0x67a8e4], ebp
jne 0x4a228a
mov dword [esp + 0x34], edi
mov edi, dword [esp + 0x24]
mov dword [esp + 0x20], ebx
jmp 0x4a245d
mov ecx, dword [esp + 0x28]
test ecx, ecx
je 0x4a2306
mov edx, dword [edi]
mov ecx, dword [esp + 0x10]
add edx, ecx
mov ecx, dword [esp + 0x18]
add eax, ecx
mov word [esp + 0x58], dx
mov word [esp + 0x5a], ax
mov al, byte [0x943a3d]
test al, 1
jne 0x4a22e6
mov dl, al
xor eax, eax
or dl, 1
push fcn.00458ab0
mov byte [0x943a3d], dl
mov word [0x9660fc], ax
mov word [0x9660fe], ax
call fcn.0053228e
add esp, 4
mov eax, dword [esi + 0x1c]
mov ecx, dword [esi + 0x20]
push 0
push 1
push ebx
lea edx, [esp + 0x64]
push ebx
push edx
push 0x9660fc
push eax
push ecx
call fcn.0047d2c0
add esp, 0x20
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x4a2379
mov edx, dword [edi]
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x18]
sub eax, edx
mov edx, dword [esp + 0x1c]
mov word [esp + 0x60], ax
mov al, byte [0x943a3d]
add edx, ecx
test al, 1
mov word [esp + 0x62], dx
jne 0x4a2359
mov dl, al
xor eax, eax
or dl, 1
push fcn.00458ab0
mov byte [0x943a3d], dl
mov word [0x9660fc], ax
mov word [0x9660fe], ax
call fcn.0053228e
add esp, 4
mov ecx, dword [esi + 0x1c]
mov edx, dword [esi + 0x20]
push 0
push 1
push ebx
lea eax, [esp + 0x6c]
push ebx
push eax
push 0x9660fc
push ecx
push edx
call fcn.0047d2c0
add esp, 0x20
mov eax, dword [esp + 0x30]
test eax, eax
je 0x4a23ea
mov eax, dword [edi]
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x18]
sub ecx, eax
mov al, byte [0x943a3d]
mov word [esp + 0x64], cx
sub edx, dword [esp + 0x1c]
test al, 1
mov word [esp + 0x66], dx
jne 0x4a23ca
mov dl, al
xor eax, eax
or dl, 1
push fcn.00458ab0
mov byte [0x943a3d], dl
mov word [0x9660fc], ax
mov word [0x9660fe], ax
call fcn.0053228e
add esp, 4
mov ecx, dword [esi + 0x1c]
mov edx, dword [esi + 0x20]
push 0
push 1
push ebx
lea eax, [esp + 0x70]
push ebx
push eax
push 0x9660fc
push ecx
push edx
call fcn.0047d2c0
add esp, 0x20
mov eax, dword [esp + 0x34]
test eax, eax
je 0x4a245d
mov eax, dword [edi]
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x1c]
add eax, ecx
mov ecx, dword [esp + 0x18]
mov word [esp + 0x38], ax
mov al, byte [0x943a3d]
sub ecx, edx
test al, 1
mov word [esp + 0x3a], cx
jne 0x4a243d
mov dl, al
xor eax, eax
or dl, 1
push fcn.00458ab0
mov byte [0x943a3d], dl
mov word [0x9660fc], ax
mov word [0x9660fe], ax
call fcn.0053228e
add esp, 4
mov eax, dword [esi + 0x1c]
mov ecx, dword [esi + 0x20]
push 0
push 1
push ebx
lea edx, [esp + 0x44]
push ebx
push edx
push 0x9660fc
push eax
push ecx
call fcn.0047d2c0
add esp, 0x20
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x14]
dec edx
inc eax
add edi, 4
cmp eax, ecx
mov dword [esp + 0x20], edx
mov dword [esp + 0x1c], eax
mov dword [esp + 0x24], edi
jl 0x4a1f98
cmp eax, dword [esp + 0x3c]
jg 0x4a2caf
lea ecx, [esp + eax*4 + 0x74]
mov dword [esp + 0x14], ecx
mov edi, dword [ecx - 4]
mov edx, dword [ecx]
sub edi, edx
dec edi
js 0x4a2994
mov edx, dword [esp + 0x20]
test edx, edx
jne 0x4a27a0
mov eax, dword [esp + 0x40]
xor edx, edx
mov ecx, 0x18
div ecx
mov eax, dword [edx*4 + 0x67a8e4]
mov edx, dword [esp + 0x40]
and eax, ebp
inc edx
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x44]
mov dword [esp + 0x40], edx
xor edx, edx
div ecx
mov eax, dword [edx*4 + 0x67a8e4]
mov edx, dword [esp + 0x44]
and eax, ebp
dec edx
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x48]
mov dword [esp + 0x44], edx
xor edx, edx
div ecx
mov eax, dword [edx*4 + 0x67a8e4]
xor edx, edx
and eax, ebp
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x48]
inc eax
mov dword [esp + 0x48], eax
mov eax, dword [esp + 0x4c]
div ecx
mov ecx, dword [esp + 0x4c]
mov eax, dword [edx*4 + 0x67a8e4]
and eax, ebp
dec ecx
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x28]
test eax, eax
mov dword [esp + 0x4c], ecx
je 0x4a25c6
mov edx, dword [esp + 0x14]
mov ecx, dword [esp + 0x1c]
mov eax, dword [edx]
mov edx, dword [esp + 0x10]
add eax, edx
mov edx, dword [esp + 0x18]
add eax, edi
add ecx, edx
mov word [esp + 0x38], ax
mov al, byte [0x943a3d]
test al, 1
mov word [esp + 0x3a], cx
jne 0x4a2588
mov dl, al
xor eax, eax
or dl, 1
push fcn.00458ab0
mov byte [0x943a3d], dl
mov word [0x9660fc], ax
mov word [0x9660fe], ax
call fcn.0053228e
add esp, 4
mov ecx, dword [esi + 0x1c]
mov edx, dword [esi + 0x20]
push 0
push 1
push ebx
lea eax, [esp + 0x44]
push ebx
push eax
push 0x9660fc
push ecx
push edx
call fcn.0047d2c0
mov eax, dword [esp + 0x60]
xor edx, edx
mov ecx, 0x18
add esp, 0x20
div ecx
test dword [edx*4 + 0x67a8e4], ebp
jne 0x4a25c6
mov dword [esp + 0x28], 0
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x4a2661
mov edx, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
mov eax, dword [edx]
mov edx, dword [esp + 0x1c]
sub ecx, eax
mov eax, dword [esp + 0x18]
add edx, eax
mov al, byte [0x943a3d]
sub ecx, edi
mov word [esp + 0x66], dx
test al, 1
mov word [esp + 0x64], cx
jne 0x4a2623
mov dl, al
xor eax, eax
or dl, 1
push fcn.00458ab0
mov byte [0x943a3d], dl
mov word [0x9660fc], ax
mov word [0x9660fe], ax
call fcn.0053228e
add esp, 4
mov edx, dword [esi + 0x1c]
mov eax, dword [esi + 0x20]
push 0
push 1
push ebx
lea ecx, [esp + 0x70]
push ebx
push ecx
push 0x9660fc
push edx
push eax
call fcn.0047d2c0
mov eax, dword [esp + 0x64]
xor edx, edx
mov ecx, 0x18
add esp, 0x20
div ecx
test dword [edx*4 + 0x67a8e4], ebp
jne 0x4a2661
mov dword [esp + 0x2c], 0
mov eax, dword [esp + 0x30]
test eax, eax
je 0x4a26fc
mov edx, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
mov eax, dword [edx]
mov edx, dword [esp + 0x18]
sub ecx, eax
mov al, byte [0x943a3d]
sub ecx, edi
mov word [esp + 0x60], cx
mov ecx, dword [esp + 0x1c]
sub edx, ecx
test al, 1
mov word [esp + 0x62], dx
jne 0x4a26be
mov dl, al
xor eax, eax
or dl, 1
push fcn.00458ab0
mov byte [0x943a3d], dl
mov word [0x9660fc], ax
mov word [0x9660fe], ax
call fcn.0053228e
add esp, 4
mov ecx, dword [esi + 0x1c]
mov edx, dword [esi + 0x20]
push 0
push 1
push ebx
lea eax, [esp + 0x6c]
push ebx
push eax
push 0x9660fc
push ecx
push edx
call fcn.0047d2c0
mov eax, dword [esp + 0x68]
xor edx, edx
mov ecx, 0x18
add esp, 0x20
div ecx
test dword [edx*4 + 0x67a8e4], ebp
jne 0x4a26fc
mov dword [esp + 0x30], 0
mov eax, dword [esp + 0x34]
test eax, eax
je 0x4a2797
mov edx, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
mov eax, dword [edx]
mov edx, dword [esp + 0x10]
add eax, edx
mov edx, dword [esp + 0x1c]
add eax, edi
sub ecx, edx
mov word [esp + 0x58], ax
mov al, byte [0x943a3d]
test al, 1
mov word [esp + 0x5a], cx
jne 0x4a2759
mov dl, al
xor eax, eax
or dl, 1
push fcn.00458ab0
mov byte [0x943a3d], dl
mov word [0x9660fc], ax
mov word [0x9660fe], ax
call fcn.0053228e
add esp, 4
mov eax, dword [esi + 0x1c]
mov ecx, dword [esi + 0x20]
push 0
push 1
push ebx
lea edx, [esp + 0x64]
push ebx
push edx
push 0x9660fc
push eax
push ecx
call fcn.0047d2c0
mov eax, dword [esp + 0x6c]
xor edx, edx
mov ecx, 0x18
add esp, 0x20
div ecx
test dword [edx*4 + 0x67a8e4], ebp
jne 0x4a2797
mov dword [esp + 0x34], 0
mov dword [esp + 0x20], ebx
jmp 0x4a297c
mov edx, dword [esp + 0x28]
test edx, edx
je 0x4a2811
mov edx, dword [ecx]
mov ecx, dword [esp + 0x10]
add edx, ecx
mov ecx, dword [esp + 0x18]
add eax, ecx
add edx, edi
mov word [esp + 0x5e], ax
mov al, byte [0x943a3d]
test al, 1
mov word [esp + 0x5c], dx
jne 0x4a27f1
mov dl, al
xor eax, eax
or dl, 1
push fcn.00458ab0
mov byte [0x943a3d], dl
mov word [0x9660fc], ax
mov word [0x9660fe], ax
call fcn.0053228e
add esp, 4
mov eax, dword [esi + 0x1c]
mov ecx, dword [esi + 0x20]
push 0
push 1
push ebx
lea edx, [esp + 0x68]
push ebx
push edx
push 0x9660fc
push eax
push ecx
call fcn.0047d2c0
add esp, 0x20
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x4a288a
mov edx, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
mov eax, dword [edx]
mov edx, dword [esp + 0x18]
sub ecx, eax
mov eax, dword [esp + 0x1c]
add eax, edx
sub ecx, edi
mov word [esp + 0x52], ax
mov al, byte [0x943a3d]
test al, 1
mov word [esp + 0x50], cx
jne 0x4a286a
mov dl, al
xor eax, eax
or dl, 1
push fcn.00458ab0
mov byte [0x943a3d], dl
mov word [0x9660fc], ax
mov word [0x9660fe], ax
call fcn.0053228e
add esp, 4
mov edx, dword [esi + 0x1c]
mov eax, dword [esi + 0x20]
push 0
push 1
push ebx
lea ecx, [esp + 0x5c]
push ebx
push ecx
push 0x9660fc
push edx
push eax
call fcn.0047d2c0
add esp, 0x20
mov eax, dword [esp + 0x30]
test eax, eax
je 0x4a2903
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
mov edx, dword [ecx]
mov ecx, dword [esp + 0x18]
sub eax, edx
mov edx, dword [esp + 0x1c]
sub eax, edi
sub ecx, edx
mov word [esp + 0x54], ax
mov al, byte [0x943a3d]
test al, 1
mov word [esp + 0x56], cx
jne 0x4a28e3
mov dl, al
xor eax, eax
or dl, 1
push fcn.00458ab0
mov byte [0x943a3d], dl
mov word [0x9660fc], ax
mov word [0x9660fe], ax
call fcn.0053228e
add esp, 4
mov eax, dword [esi + 0x1c]
mov ecx, dword [esi + 0x20]
push 0
push 1
push ebx
lea edx, [esp + 0x60]
push ebx
push edx
push 0x9660fc
push eax
push ecx
call fcn.0047d2c0
add esp, 0x20
mov eax, dword [esp + 0x34]
test eax, eax
je 0x4a297c
mov edx, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
mov eax, dword [edx]
mov edx, dword [esp + 0x10]
add eax, edx
mov edx, dword [esp + 0x1c]
add eax, edi
sub ecx, edx
mov word [esp + 0x68], ax
mov al, byte [0x943a3d]
test al, 1
mov word [esp + 0x6a], cx
jne 0x4a295c
mov dl, al
xor eax, eax
or dl, 1
push fcn.00458ab0
mov byte [0x943a3d], dl
mov word [0x9660fc], ax
mov word [0x9660fe], ax
call fcn.0053228e
add esp, 4
mov eax, dword [esi + 0x1c]
mov ecx, dword [esi + 0x20]
push 0
push 1
push ebx
lea edx, [esp + 0x74]
push ebx
push edx
push 0x9660fc
push eax
push ecx
call fcn.0047d2c0
add esp, 0x20
mov ecx, dword [esp + 0x20]
mov eax, dword [esp + 0x1c]
dec ecx
dec edi
mov dword [esp + 0x20], ecx
mov ecx, dword [esp + 0x14]
jns 0x4a24a2
mov edx, dword [esp + 0x3c]
inc eax
add ecx, 4
cmp eax, edx
mov dword [esp + 0x1c], eax
mov dword [esp + 0x14], ecx
jle 0x4a2494
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4064
ret 0x18
lea eax, [edi + edi]
xor ecx, ecx
mov dword [esp + 0x30], eax
mov dword [esp + 0x28], ecx
lea edx, [eax - 1]
lea eax, [edi*4 - 1]
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x14]
cmp eax, ecx
mov dword [esp + 0x2c], edx
mov dword [esp + 0x1c], ecx
jle 0x4a2b1a
mov ebx, dword [esp + 0x18]
lea edi, [esp + 0x74]
mov ebp, ebx
mov dword [esp + 0x38], eax
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x28]
xor edx, edx
mov ecx, 0x18
div ecx
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x28]
mov edx, dword [edx*4 + 0x67a8e4]
and edx, eax
inc ecx
test edx, edx
mov dword [esp + 0x28], ecx
je 0x4a2a3d
mov eax, dword [edi]
mov ecx, dword [esp + 0x10]
add eax, ecx
js 0x4a2a3d
test ebx, ebx
jl 0x4a2a3d
mov ecx, dword [esi + 8]
push ecx
mov ecx, dword [esi + 0x1c]
push ebx
push eax
call fcn.004bb980
mov eax, dword [esp + 0x2c]
xor edx, edx
mov ecx, 0x18
div ecx
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x2c]
mov edx, dword [edx*4 + 0x67a8e4]
and edx, eax
dec ecx
test edx, edx
mov dword [esp + 0x2c], ecx
je 0x4a2a80
mov eax, dword [esp + 0x10]
mov ecx, dword [edi]
sub eax, ecx
js 0x4a2a80
test ebx, ebx
jl 0x4a2a80
mov ecx, dword [esi + 8]
push ecx
mov ecx, dword [esi + 0x1c]
push ebx
push eax
call fcn.004bb980
mov eax, dword [esp + 0x30]
xor edx, edx
mov ecx, 0x18
div ecx
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x30]
mov edx, dword [edx*4 + 0x67a8e4]
and edx, eax
inc ecx
test edx, edx
mov dword [esp + 0x30], ecx
je 0x4a2ac3
mov eax, dword [esp + 0x10]
mov ecx, dword [edi]
sub eax, ecx
js 0x4a2ac3
test ebp, ebp
jl 0x4a2ac3
mov ecx, dword [esi + 8]
push ecx
mov ecx, dword [esi + 0x1c]
push ebp
push eax
call fcn.004bb980
mov eax, dword [esp + 0x34]
xor edx, edx
mov ecx, 0x18
div ecx
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x34]
mov edx, dword [edx*4 + 0x67a8e4]
and edx, eax
dec ecx
test edx, edx
mov dword [esp + 0x34], ecx
je 0x4a2b06
mov eax, dword [edi]
mov ecx, dword [esp + 0x10]
add eax, ecx
js 0x4a2b06
test ebp, ebp
jl 0x4a2b06
mov ecx, dword [esi + 8]
push ecx
mov ecx, dword [esi + 0x1c]
push ebp
push eax
call fcn.004bb980
mov eax, dword [esp + 0x38]
inc ebx
dec ebp
add edi, 4
dec eax
mov dword [esp + 0x38], eax
jne 0x4a29fa
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x3c]
cmp eax, ecx
jg 0x4a2caf
mov edx, dword [esp + 0x18]
mov ebp, dword [esp + 0x10]
sub ecx, eax
lea edi, [eax + edx]
sub edx, eax
inc ecx
mov dword [esp + 0x24], edi
lea edi, [esp + eax*4 + 0x74]
mov dword [esp + 0x14], edx
mov dword [esp + 0x38], ecx
mov ebx, dword [edi - 4]
mov ecx, dword [edi]
sub ebx, ecx
dec ebx
js 0x4a2c8b
mov eax, dword [esp + 0x28]
xor edx, edx
mov ecx, 0x18
div ecx
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x28]
mov edx, dword [edx*4 + 0x67a8e4]
and edx, eax
inc ecx
test edx, edx
mov dword [esp + 0x28], ecx
je 0x4a2ba3
mov edx, dword [edi]
mov eax, ebx
add eax, edx
add eax, ebp
js 0x4a2ba3
mov ecx, dword [esp + 0x24]
test ecx, ecx
jl 0x4a2ba3
mov ecx, dword [esi + 8]
mov edx, dword [esp + 0x24]
push ecx
mov ecx, dword [esi + 0x1c]
push edx
push eax
call fcn.004bb980
mov eax, dword [esp + 0x2c]
xor edx, edx
mov ecx, 0x18
div ecx
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x2c]
mov edx, dword [edx*4 + 0x67a8e4]
and edx, eax
dec ecx
test edx, edx
mov dword [esp + 0x2c], ecx
je 0x4a2bee
mov ecx, dword [edi]
mov eax, ebp
sub eax, ebx
sub eax, ecx
js 0x4a2bee
mov ecx, dword [esp + 0x24]
test ecx, ecx
jl 0x4a2bee
mov ecx, dword [esi + 8]
mov edx, dword [esp + 0x24]
push ecx
mov ecx, dword [esi + 0x1c]
push edx
push eax
call fcn.004bb980
mov eax, dword [esp + 0x30]
xor edx, edx
mov ecx, 0x18
div ecx
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x30]
mov edx, dword [edx*4 + 0x67a8e4]
and edx, eax
inc ecx
test edx, edx
mov dword [esp + 0x30], ecx
je 0x4a2c39
mov ecx, dword [edi]
mov eax, ebp
sub eax, ebx
sub eax, ecx
js 0x4a2c39
mov ecx, dword [esp + 0x14]
test ecx, ecx
jl 0x4a2c39
mov ecx, dword [esi + 8]
mov edx, dword [esp + 0x14]
push ecx
mov ecx, dword [esi + 0x1c]
push edx
push eax
call fcn.004bb980
mov eax, dword [esp + 0x34]
xor edx, edx
mov ecx, 0x18
div ecx
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x34]
mov edx, dword [edx*4 + 0x67a8e4]
and edx, eax
dec ecx
test edx, edx
mov dword [esp + 0x34], ecx
je 0x4a2c84
mov edx, dword [edi]
mov eax, ebx
add eax, edx
add eax, ebp
js 0x4a2c84
mov ecx, dword [esp + 0x14]
test ecx, ecx
jl 0x4a2c84
mov ecx, dword [esi + 8]
mov edx, dword [esp + 0x14]
push ecx
mov ecx, dword [esi + 0x1c]
push edx
push eax
call fcn.004bb980
dec ebx
jns 0x4a2b58
mov ebx, dword [esp + 0x24]
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x38]
inc ebx
dec edx
add edi, 4
dec eax
mov dword [esp + 0x24], ebx
mov dword [esp + 0x14], edx
mov dword [esp + 0x38], eax
jne 0x4a2b4a
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4064
ret 0x18