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

Disassembly:
mov eax, 0x4064
call fcn.0051c710
push ebx
push ebp
mov ebp, dword [esp + 0x4078]
push esi
cmp ebp, 3
push edi
mov esi, ecx
jl 0x49502f
mov eax, dword [esp + 0x4084]
cmp eax, 3
jl 0x49502f
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 0x49405e
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.00499040
mov eax, dword [esp + 0x48]
add esp, 0xc
mov eax, dword [esp + eax*4 + 0x78]
cmp eax, 1
mov dword [esp + 0x14], eax
jg 0x4940aa
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.004b4a60
mov eax, dword [esp + 0x4088]
mov dx, word [eax]
cmp dx, word [eax + 4]
jg 0x4940fa
mov cx, word [eax + 2]
cmp cx, word [eax + 6]
jg 0x4940fa
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 0x49417f
mov eax, dword [esp + 0x3c]
xor ebp, ebp
test eax, eax
jle 0x49417f
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.004981b0
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.004981b0
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 0x494117
mov al, byte [esi + 4]
and eax, 0xf
mov edi, eax
je 0x49502f
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.00496e90
cmp edi, 1
jne 0x49429e
cmp ebx, edi
jle 0x494231
mov ebp, dword [esp + 0x14]
xor edi, edi
test ebp, ebp
jle 0x4941e4
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.00499300
inc edi
add ebx, 4
cmp edi, ebp
jl 0x4941c7
cmp edi, dword [esp + 0x3c]
jg 0x49502f
lea ebp, [esp + edi*4 + 0x74]
mov ebx, dword [ebp - 4]
mov ecx, dword [ebp]
sub ebx, ecx
dec ebx
js 0x494218
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.00499300
dec ebx
jns 0x4941fd
mov eax, dword [esp + 0x3c]
inc edi
add ebp, 4
cmp edi, eax
jle 0x4941f2
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 0x49425e
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.00499230
inc edi
add ebx, 4
cmp edi, ebp
jl 0x49423f
mov ebp, dword [esp + 0x3c]
cmp edi, ebp
jg 0x49502f
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.00499230
inc edi
add ebx, 4
cmp edi, ebp
jle 0x49426e
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 0x4942c0
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 0x4942b1
mov ecx, esi
call fcn.00496e30
mov ebp, eax
cmp ebx, 1
mov dword [esp + 0x20], ebp
jle 0x494d39
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 0x494802
lea edi, [esp + 0x74]
mov dword [esp + 0x24], edi
mov ecx, dword [esp + 0x20]
test ecx, ecx
jne 0x494617
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 + 0x659a34]
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 + 0x659a34]
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 + 0x659a34]
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 + 0x659a34]
mov edx, dword [esp + 0x4c]
and eax, ebp
dec edx
test ecx, ecx
mov dword [esp + 0x34], eax
mov dword [esp + 0x4c], edx
je 0x49443f
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 [0x8d8105]
add ecx, edx
test al, 1
mov word [esp + 0x6a], cx
jne 0x494404
mov dl, al
xor edi, edi
or dl, 1
push fcn.00402b00
mov byte [0x8d8105], dl
mov word [0x8fa7d8], di
mov word [0x8fa7da], di
call fcn.0051c6ca
add esp, 4
jmp 0x494406
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 0x8fa7d8
push ecx
push edx
call fcn.00474b30
mov eax, dword [esp + 0x60]
xor edx, edx
mov ecx, 0x18
add esp, 0x20
div ecx
test dword [edx*4 + 0x659a34], ebp
jne 0x49443f
mov dword [esp + 0x28], edi
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x4944db
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 [0x8d8105]
test al, 1
jne 0x49449b
mov dl, al
xor eax, eax
or dl, 1
push fcn.00402b00
mov byte [0x8d8105], dl
mov word [0x8fa7d8], ax
mov word [0x8fa7da], ax
call fcn.0051c6ca
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 0x8fa7d8
push edx
push eax
call fcn.00474b30
mov eax, dword [esp + 0x64]
xor edx, edx
mov ecx, 0x18
add esp, 0x20
div ecx
test dword [edx*4 + 0x659a34], ebp
jne 0x4944df
mov dword [esp + 0x2c], 0
jmp 0x4944df
mov edi, dword [esp + 0x1c]
mov eax, dword [esp + 0x30]
test eax, eax
je 0x494574
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 [0x8d8105]
sub edx, edi
mov word [esp + 0x50], cx
test al, 1
mov word [esp + 0x52], dx
jne 0x494536
mov dl, al
xor eax, eax
or dl, 1
push fcn.00402b00
mov byte [0x8d8105], dl
mov word [0x8fa7d8], ax
mov word [0x8fa7da], ax
call fcn.0051c6ca
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 0x8fa7d8
push ecx
push edx
call fcn.00474b30
mov eax, dword [esp + 0x68]
xor edx, edx
mov ecx, 0x18
add esp, 0x20
div ecx
test dword [edx*4 + 0x659a34], ebp
jne 0x494574
mov dword [esp + 0x30], 0
mov eax, dword [esp + 0x34]
test eax, eax
je 0x49460a
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 [0x8d8105]
sub ecx, edi
test al, 1
mov word [esp + 0x5e], cx
jne 0x4945cf
mov dl, al
xor edi, edi
or dl, 1
push fcn.00402b00
mov byte [0x8d8105], dl
mov word [0x8fa7d8], di
mov word [0x8fa7da], di
call fcn.0051c6ca
add esp, 4
jmp 0x4945d1
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 0x8fa7d8
push eax
push ecx
call fcn.00474b30
mov eax, dword [esp + 0x6c]
xor edx, edx
mov ecx, 0x18
add esp, 0x20
div ecx
test dword [edx*4 + 0x659a34], ebp
jne 0x49460a
mov dword [esp + 0x34], edi
mov edi, dword [esp + 0x24]
mov dword [esp + 0x20], ebx
jmp 0x4947dd
mov ecx, dword [esp + 0x28]
test ecx, ecx
je 0x494686
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 [0x8d8105]
test al, 1
jne 0x494666
mov dl, al
xor eax, eax
or dl, 1
push fcn.00402b00
mov byte [0x8d8105], dl
mov word [0x8fa7d8], ax
mov word [0x8fa7da], ax
call fcn.0051c6ca
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 0x8fa7d8
push eax
push ecx
call fcn.00474b30
add esp, 0x20
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x4946f9
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 [0x8d8105]
add edx, ecx
test al, 1
mov word [esp + 0x62], dx
jne 0x4946d9
mov dl, al
xor eax, eax
or dl, 1
push fcn.00402b00
mov byte [0x8d8105], dl
mov word [0x8fa7d8], ax
mov word [0x8fa7da], ax
call fcn.0051c6ca
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 0x8fa7d8
push ecx
push edx
call fcn.00474b30
add esp, 0x20
mov eax, dword [esp + 0x30]
test eax, eax
je 0x49476a
mov eax, dword [edi]
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x18]
sub ecx, eax
mov al, byte [0x8d8105]
mov word [esp + 0x64], cx
sub edx, dword [esp + 0x1c]
test al, 1
mov word [esp + 0x66], dx
jne 0x49474a
mov dl, al
xor eax, eax
or dl, 1
push fcn.00402b00
mov byte [0x8d8105], dl
mov word [0x8fa7d8], ax
mov word [0x8fa7da], ax
call fcn.0051c6ca
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 0x8fa7d8
push ecx
push edx
call fcn.00474b30
add esp, 0x20
mov eax, dword [esp + 0x34]
test eax, eax
je 0x4947dd
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 [0x8d8105]
sub ecx, edx
test al, 1
mov word [esp + 0x3a], cx
jne 0x4947bd
mov dl, al
xor eax, eax
or dl, 1
push fcn.00402b00
mov byte [0x8d8105], dl
mov word [0x8fa7d8], ax
mov word [0x8fa7da], ax
call fcn.0051c6ca
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 0x8fa7d8
push eax
push ecx
call fcn.00474b30
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 0x494318
cmp eax, dword [esp + 0x3c]
jg 0x49502f
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 0x494d14
mov edx, dword [esp + 0x20]
test edx, edx
jne 0x494b20
mov eax, dword [esp + 0x40]
xor edx, edx
mov ecx, 0x18
div ecx
mov eax, dword [edx*4 + 0x659a34]
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 + 0x659a34]
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 + 0x659a34]
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 + 0x659a34]
and eax, ebp
dec ecx
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x28]
test eax, eax
mov dword [esp + 0x4c], ecx
je 0x494946
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 [0x8d8105]
test al, 1
mov word [esp + 0x3a], cx
jne 0x494908
mov dl, al
xor eax, eax
or dl, 1
push fcn.00402b00
mov byte [0x8d8105], dl
mov word [0x8fa7d8], ax
mov word [0x8fa7da], ax
call fcn.0051c6ca
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 0x8fa7d8
push ecx
push edx
call fcn.00474b30
mov eax, dword [esp + 0x60]
xor edx, edx
mov ecx, 0x18
add esp, 0x20
div ecx
test dword [edx*4 + 0x659a34], ebp
jne 0x494946
mov dword [esp + 0x28], 0
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x4949e1
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 [0x8d8105]
sub ecx, edi
mov word [esp + 0x66], dx
test al, 1
mov word [esp + 0x64], cx
jne 0x4949a3
mov dl, al
xor eax, eax
or dl, 1
push fcn.00402b00
mov byte [0x8d8105], dl
mov word [0x8fa7d8], ax
mov word [0x8fa7da], ax
call fcn.0051c6ca
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 0x8fa7d8
push edx
push eax
call fcn.00474b30
mov eax, dword [esp + 0x64]
xor edx, edx
mov ecx, 0x18
add esp, 0x20
div ecx
test dword [edx*4 + 0x659a34], ebp
jne 0x4949e1
mov dword [esp + 0x2c], 0
mov eax, dword [esp + 0x30]
test eax, eax
je 0x494a7c
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 [0x8d8105]
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 0x494a3e
mov dl, al
xor eax, eax
or dl, 1
push fcn.00402b00
mov byte [0x8d8105], dl
mov word [0x8fa7d8], ax
mov word [0x8fa7da], ax
call fcn.0051c6ca
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 0x8fa7d8
push ecx
push edx
call fcn.00474b30
mov eax, dword [esp + 0x68]
xor edx, edx
mov ecx, 0x18
add esp, 0x20
div ecx
test dword [edx*4 + 0x659a34], ebp
jne 0x494a7c
mov dword [esp + 0x30], 0
mov eax, dword [esp + 0x34]
test eax, eax
je 0x494b17
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 [0x8d8105]
test al, 1
mov word [esp + 0x5a], cx
jne 0x494ad9
mov dl, al
xor eax, eax
or dl, 1
push fcn.00402b00
mov byte [0x8d8105], dl
mov word [0x8fa7d8], ax
mov word [0x8fa7da], ax
call fcn.0051c6ca
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 0x8fa7d8
push eax
push ecx
call fcn.00474b30
mov eax, dword [esp + 0x6c]
xor edx, edx
mov ecx, 0x18
add esp, 0x20
div ecx
test dword [edx*4 + 0x659a34], ebp
jne 0x494b17
mov dword [esp + 0x34], 0
mov dword [esp + 0x20], ebx
jmp 0x494cfc
mov edx, dword [esp + 0x28]
test edx, edx
je 0x494b91
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 [0x8d8105]
test al, 1
mov word [esp + 0x5c], dx
jne 0x494b71
mov dl, al
xor eax, eax
or dl, 1
push fcn.00402b00
mov byte [0x8d8105], dl
mov word [0x8fa7d8], ax
mov word [0x8fa7da], ax
call fcn.0051c6ca
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 0x8fa7d8
push eax
push ecx
call fcn.00474b30
add esp, 0x20
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x494c0a
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 [0x8d8105]
test al, 1
mov word [esp + 0x50], cx
jne 0x494bea
mov dl, al
xor eax, eax
or dl, 1
push fcn.00402b00
mov byte [0x8d8105], dl
mov word [0x8fa7d8], ax
mov word [0x8fa7da], ax
call fcn.0051c6ca
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 0x8fa7d8
push edx
push eax
call fcn.00474b30
add esp, 0x20
mov eax, dword [esp + 0x30]
test eax, eax
je 0x494c83
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 [0x8d8105]
test al, 1
mov word [esp + 0x56], cx
jne 0x494c63
mov dl, al
xor eax, eax
or dl, 1
push fcn.00402b00
mov byte [0x8d8105], dl
mov word [0x8fa7d8], ax
mov word [0x8fa7da], ax
call fcn.0051c6ca
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 0x8fa7d8
push eax
push ecx
call fcn.00474b30
add esp, 0x20
mov eax, dword [esp + 0x34]
test eax, eax
je 0x494cfc
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 [0x8d8105]
test al, 1
mov word [esp + 0x6a], cx
jne 0x494cdc
mov dl, al
xor eax, eax
or dl, 1
push fcn.00402b00
mov byte [0x8d8105], dl
mov word [0x8fa7d8], ax
mov word [0x8fa7da], ax
call fcn.0051c6ca
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 0x8fa7d8
push eax
push ecx
call fcn.00474b30
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 0x494822
mov edx, dword [esp + 0x3c]
inc eax
add ecx, 4
cmp eax, edx
mov dword [esp + 0x1c], eax
mov dword [esp + 0x14], ecx
jle 0x494814
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 0x494e9a
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 + 0x659a34]
and edx, eax
inc ecx
test edx, edx
mov dword [esp + 0x28], ecx
je 0x494dbd
mov eax, dword [edi]
mov ecx, dword [esp + 0x10]
add eax, ecx
js 0x494dbd
test ebx, ebx
jl 0x494dbd
mov ecx, dword [esi + 8]
push ecx
mov ecx, dword [esi + 0x1c]
push ebx
push eax
call fcn.004a8430
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 + 0x659a34]
and edx, eax
dec ecx
test edx, edx
mov dword [esp + 0x2c], ecx
je 0x494e00
mov eax, dword [esp + 0x10]
mov ecx, dword [edi]
sub eax, ecx
js 0x494e00
test ebx, ebx
jl 0x494e00
mov ecx, dword [esi + 8]
push ecx
mov ecx, dword [esi + 0x1c]
push ebx
push eax
call fcn.004a8430
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 + 0x659a34]
and edx, eax
inc ecx
test edx, edx
mov dword [esp + 0x30], ecx
je 0x494e43
mov eax, dword [esp + 0x10]
mov ecx, dword [edi]
sub eax, ecx
js 0x494e43
test ebp, ebp
jl 0x494e43
mov ecx, dword [esi + 8]
push ecx
mov ecx, dword [esi + 0x1c]
push ebp
push eax
call fcn.004a8430
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 + 0x659a34]
and edx, eax
dec ecx
test edx, edx
mov dword [esp + 0x34], ecx
je 0x494e86
mov eax, dword [edi]
mov ecx, dword [esp + 0x10]
add eax, ecx
js 0x494e86
test ebp, ebp
jl 0x494e86
mov ecx, dword [esi + 8]
push ecx
mov ecx, dword [esi + 0x1c]
push ebp
push eax
call fcn.004a8430
mov eax, dword [esp + 0x38]
inc ebx
dec ebp
add edi, 4
dec eax
mov dword [esp + 0x38], eax
jne 0x494d7a
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x3c]
cmp eax, ecx
jg 0x49502f
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 0x49500b
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 + 0x659a34]
and edx, eax
inc ecx
test edx, edx
mov dword [esp + 0x28], ecx
je 0x494f23
mov edx, dword [edi]
mov eax, ebx
add eax, edx
add eax, ebp
js 0x494f23
mov ecx, dword [esp + 0x24]
test ecx, ecx
jl 0x494f23
mov ecx, dword [esi + 8]
mov edx, dword [esp + 0x24]
push ecx
mov ecx, dword [esi + 0x1c]
push edx
push eax
call fcn.004a8430
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 + 0x659a34]
and edx, eax
dec ecx
test edx, edx
mov dword [esp + 0x2c], ecx
je 0x494f6e
mov ecx, dword [edi]
mov eax, ebp
sub eax, ebx
sub eax, ecx
js 0x494f6e
mov ecx, dword [esp + 0x24]
test ecx, ecx
jl 0x494f6e
mov ecx, dword [esi + 8]
mov edx, dword [esp + 0x24]
push ecx
mov ecx, dword [esi + 0x1c]
push edx
push eax
call fcn.004a8430
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 + 0x659a34]
and edx, eax
inc ecx
test edx, edx
mov dword [esp + 0x30], ecx
je 0x494fb9
mov ecx, dword [edi]
mov eax, ebp
sub eax, ebx
sub eax, ecx
js 0x494fb9
mov ecx, dword [esp + 0x14]
test ecx, ecx
jl 0x494fb9
mov ecx, dword [esi + 8]
mov edx, dword [esp + 0x14]
push ecx
mov ecx, dword [esi + 0x1c]
push edx
push eax
call fcn.004a8430
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 + 0x659a34]
and edx, eax
dec ecx
test edx, edx
mov dword [esp + 0x34], ecx
je 0x495004
mov edx, dword [edi]
mov eax, ebx
add eax, edx
add eax, ebp
js 0x495004
mov ecx, dword [esp + 0x14]
test ecx, ecx
jl 0x495004
mov ecx, dword [esi + 8]
mov edx, dword [esp + 0x14]
push ecx
mov ecx, dword [esi + 0x1c]
push edx
push eax
call fcn.004a8430
dec ebx
jns 0x494ed8
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 0x494eca
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4064
ret 0x18