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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x74
push ebx
push esi
mov esi, ecx
mov ecx, dword [esi + 0xa4]
push edi
mov dword [esp + 0x1c], esi
call fcn.00468bb0
test eax, eax
jne 0x49194b
mov ecx, dword [esi + 0xa4]
xor edi, edi
xor ebx, ebx
mov dword [esp + 0x40], edi
cmp dword [ecx + 0x100], 2
mov dword [esp + 0x14], edi
sete al
mov dword [esp + 0x58], ebx
mov dword [esp + 0x3c], eax
cmp eax, edi
je 0x490bb0
push 1
push edi
push 1
lea eax, [esp + 0x4c]
push eax
call fcn.004706a0
mov ebx, dword [esp + 0x40]
mov dword [esp + 0x4c], eax
mov dword [esp + 0x5c], eax
mov eax, dword [esi + 0xa4]
mov esi, dword [eax + 0x1ac]
sub esi, dword [eax + 0x1a8]
mov dword [esp + 0x58], ebx
mov dword [esp + 0x44], edi
mov dword [esp + 0x54], edi
mov dword [esp + 0x48], edi
mov dword [esp + 0x34], esi
jmp 0x490bd3
lea ecx, [esp + 0x34]
push ecx
lea edx, [esp + 0x48]
push edx
lea eax, [esp + 0x50]
push eax
lea ecx, [esp + 0x60]
push ecx
mov ecx, esi
call fcn.004811b0
mov edi, dword [esp + 0x48]
mov esi, dword [esp + 0x34]
cmp edi, esi
mov dword [esp + 0x28], edi
jg 0x4910c1
nop
xor esi, esi
mov dword [esp + 0x24], esi
mov dword [esp + 0x10], esi
cmp dword [esp + 0x3c], esi
je 0x490c4b
mov eax, dword [esp + 0x40]
mov ecx, dword [esp + 0x4c]
xor edi, edi
cmp ecx, esi
mov edx, eax
mov dword [esp + 0x20], edx
mov dword [esp + 0x18], edi
jle 0x490c30
jmp 0x490c10
mov ebx, 0xd
cmp bx, word [eax + edi*2]
jne 0x490c27
mov ebx, 0xa
cmp bx, word [eax + edi*2 + 2]
je 0x490c2c
inc edi
cmp edi, ecx
jl 0x490c10
mov dword [esp + 0x18], edi
lea eax, [eax + edi*2 + 4]
mov dword [esp + 0x40], eax
mov eax, 0xfffffffe
sub eax, edi
add ecx, eax
mov dword [esp + 0x50], edi
mov dword [esp + 0x4c], ecx
jmp 0x490c80
mov ecx, dword [esp + 0x1c]
mov edx, dword [ecx + 0xa4]
mov ecx, dword [esp + 0x28]
mov edx, dword [edx + 0x2e0]
mov eax, ecx
shl eax, 5
add eax, edx
mov edx, dword [eax + 8]
mov dword [esp + 0x20], edx
cmp ecx, dword [esp + 0x34]
jne 0x490c79
mov edi, dword [esp + 0x44]
jmp 0x490c7c
mov edi, dword [eax]
dec edi
mov dword [esp + 0x18], edi
cmp edi, esi
jle 0x490e34
lea eax, [edx + edi*2 - 2]
movzx ecx, word [eax]
mov edx, 0x20
cmp dx, cx
je 0x490ca3
mov edx, 9
cmp dx, cx
jne 0x490cab
dec edi
sub eax, 2
cmp edi, esi
jg 0x490c8c
cmp edi, esi
mov dword [esp + 0x18], edi
jle 0x490e34
mov ebx, dword [esp + 0x24]
jmp 0x490cc0
mov eax, dword [esp + 0x20]
movzx eax, word [eax + esi*2]
mov ecx, 9
cmp cx, ax
jne 0x490ced
mov edx, dword [esp + 0x1c]
mov eax, dword [edx + 0xa4]
mov ecx, dword [eax + 0x10c]
xor eax, eax
cdq
idiv ecx
sub ecx, edx
add ebx, ecx
jmp 0x490cf8
mov ecx, 0x20
cmp cx, ax
jne 0x490d06
inc ebx
inc esi
cmp esi, edi
jl 0x490cc0
mov dword [esp + 0x24], ebx
jmp 0x490e34
cmp esi, edi
mov dword [esp + 0x24], ebx
mov dword [esp + 0x10], ebx
jge 0x490e34
jmp 0x490d20
mov edx, dword [esp + 0x20]
movzx eax, word [edx + esi*2]
mov ecx, 9
cmp cx, ax
jne 0x490d58
mov edx, dword [esp + 0x1c]
mov eax, dword [edx + 0xa4]
mov ecx, dword [eax + 0x10c]
mov ebx, dword [esp + 0x10]
mov eax, ebx
cdq
idiv ecx
sub ecx, edx
add ebx, ecx
mov dword [esp + 0x10], ebx
jmp 0x490e2b
test byte [0x589d03], 1
movzx eax, ax
jne 0x490e7a
movzx ecx, ax
movzx eax, ax
cmp word [eax*2 + 0x589d10], 0
mov dword [esp + 0x38], ecx
jne 0x490dbb
mov ecx, dword [0x5a9d14]
lea edx, [esp + 0x60]
push edx
push 1
lea eax, [esp + 0x40]
push eax
push ecx
call dword [0x53d21c]
cmp dword [0x589d08], 0
je 0x490da9
mov edx, dword [0x589cec]
sub dword [esp + 0x60], edx
movzx eax, word [esp + 0x38]
mov cx, word [esp + 0x60]
mov word [eax*2 + 0x589d10], cx
cmp word [0x589e00], 0
movzx ebx, word [eax*2 + 0x589d10]
mov eax, 0x78
mov dword [esp + 0x30], eax
jne 0x490e16
mov ecx, dword [0x5a9d14]
lea edx, [esp + 0x68]
push edx
push 1
lea eax, [esp + 0x38]
push eax
push ecx
call dword [0x53d21c]
cmp dword [0x589d08], 0
je 0x490e02
mov edx, dword [0x589cec]
sub dword [esp + 0x68], edx
mov eax, dword [esp + 0x30]
mov dx, word [esp + 0x68]
movzx ecx, ax
mov word [ecx*2 + 0x589d10], dx
movzx eax, ax
movzx ecx, word [eax*2 + 0x589d10]
add ecx, ecx
cmp ebx, ecx
jge 0x490e89
inc dword [esp + 0x10]
inc esi
cmp esi, edi
jl 0x490d20
cmp dword [esp + 0x3c], 0
je 0x490e9a
cmp esi, dword [esp + 0x50]
mov ebx, dword [esp + 0x10]
mov dword [esp + 0x38], ebx
jge 0x490eae
lea esp, [esp]
mov ecx, dword [esp + 0x20]
mov eax, 9
cmp ax, word [ecx + esi*2]
jne 0x490e90
mov edx, dword [esp + 0x1c]
mov eax, dword [edx + 0xa4]
mov ecx, dword [eax + 0x10c]
mov eax, ebx
cdq
idiv ecx
sub ecx, edx
add ebx, ecx
jmp 0x490e91
add eax, 0xffffd180
mov edx, 0xcc59
cmp ax, dx
ja 0x490e27
add dword [esp + 0x10], 2
jmp 0x490e2b
inc ebx
inc esi
cmp esi, dword [esp + 0x50]
jl 0x490e50
jmp 0x490eaa
mov ecx, dword [esp + 0x1c]
mov edx, dword [ecx + 0xa4]
mov ebx, dword [edx + 0xdc]
mov dword [esp + 0x38], ebx
xor eax, eax
test edi, edi
jle 0x490edc
mov ecx, dword [ebp + 8]
cmp ecx, 2
jne 0x490ec8
mov eax, ebx
sub eax, dword [esp + 0x10]
add eax, dword [esp + 0x24]
jmp 0x490edc
cmp ecx, 1
jne 0x490edc
mov eax, ebx
sub eax, dword [esp + 0x10]
add eax, dword [esp + 0x24]
cdq
sub eax, edx
sar eax, 1
xor edi, edi
test eax, eax
jle 0x490ee8
add dword [esp + 0x14], eax
mov edi, eax
xor ebx, ebx
cmp dword [esp + 0x18], ebx
jle 0x49104f
mov edx, dword [esp + 0x18]
mov ecx, dword [esp + 0x20]
lea esp, [esp]
movzx eax, word [ecx + ebx*2]
mov esi, 9
cmp si, ax
je 0x490f18
mov esi, 0x20
cmp si, ax
jne 0x490f22
inc ebx
cmp ebx, edx
jl 0x490f00
jmp 0x49104f
cmp ebx, edx
jge 0x49104f
lea ebx, [ebx]
mov eax, dword [esp + 0x20]
movzx eax, word [eax + ebx*2]
mov ecx, 9
cmp cx, ax
jne 0x490f6c
mov edx, dword [esp + 0x1c]
mov eax, dword [edx + 0xa4]
mov ecx, dword [eax + 0x10c]
mov eax, edi
cdq
idiv ecx
sub ecx, edx
add edi, ecx
test ecx, ecx
jle 0x491044
add dword [esp + 0x14], ecx
jmp 0x491044
test byte [0x589d03], 1
movzx eax, ax
jne 0x4910f9
movzx ecx, ax
movzx eax, ax
cmp word [eax*2 + 0x589d10], 0
mov dword [esp + 0x30], ecx
jne 0x490fcf
mov ecx, dword [0x5a9d14]
lea edx, [esp + 0x70]
push edx
push 1
lea eax, [esp + 0x38]
push eax
push ecx
call dword [0x53d21c]
cmp dword [0x589d08], 0
je 0x490fbd
mov edx, dword [0x589cec]
sub dword [esp + 0x70], edx
movzx eax, word [esp + 0x30]
mov cx, word [esp + 0x70]
mov word [eax*2 + 0x589d10], cx
cmp word [0x589e00], 0
movzx esi, word [eax*2 + 0x589d10]
mov eax, 0x78
mov dword [esp + 0x2c], eax
jne 0x49102a
mov ecx, dword [0x5a9d14]
lea edx, [esp + 0x78]
push edx
push 1
lea eax, [esp + 0x34]
push eax
push ecx
call dword [0x53d21c]
cmp dword [0x589d08], 0
je 0x491016
mov edx, dword [0x589cec]
sub dword [esp + 0x78], edx
mov eax, dword [esp + 0x2c]
mov dx, word [esp + 0x78]
movzx ecx, ax
mov word [ecx*2 + 0x589d10], dx
movzx eax, ax
movzx ecx, word [eax*2 + 0x589d10]
add ecx, ecx
cmp esi, ecx
jge 0x49110c
inc edi
inc dword [esp + 0x14]
inc ebx
cmp ebx, dword [esp + 0x18]
jl 0x490f30
mov edx, dword [esp + 0x3c]
mov ecx, dword [esp + 0x28]
test edx, edx
je 0x491097
mov eax, dword [esp + 0x1c]
mov eax, dword [eax + 0xa4]
mov esi, dword [eax + 0x1a8]
mov ebx, dword [eax + 0x2e0]
mov eax, dword [eax + 0x198]
add esi, ecx
shl esi, 5
mov esi, dword [esi + ebx]
dec esi
lea ebx, [ecx + ecx*2]
cmp dword [eax + ebx*4 + 4], esi
jge 0x491097
mov eax, dword [esp + 0x38]
cmp edi, eax
jge 0x491097
sub eax, edi
add dword [esp + 0x14], eax
mov eax, dword [esp + 0x34]
cmp ecx, eax
jl 0x4910a3
test edx, edx
je 0x4910a8
add dword [esp + 0x14], 2
inc ecx
cmp ecx, eax
mov dword [esp + 0x28], ecx
jle 0x490be0
mov esi, dword [esp + 0x34]
mov edi, dword [esp + 0x48]
mov ebx, dword [esp + 0x58]
mov eax, dword [esp + 0x14]
xor ecx, ecx
inc eax
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004d76f8
add esp, 4
mov dword [esp + 0x2c], eax
test eax, eax
jne 0x491114
push ebx
call fcn.004d7727
add esp, 4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
add eax, 0xffffd180
mov edx, 0xcc59
cmp ax, dx
ja 0x49103f
add edi, 2
jmp 0x491040
mov ecx, dword [esp + 0x5c]
mov eax, ebx
xor ebx, ebx
cmp edi, esi
mov dword [esp + 0x40], eax
mov dword [esp + 0x4c], ecx
mov dword [esp + 0x14], ebx
mov dword [esp + 0x28], edi
jg 0x4916be
jmp 0x49113a
mov eax, dword [esp + 0x40]
xor edi, edi
mov dword [esp + 0x24], edi
mov dword [esp + 0x10], edi
cmp dword [esp + 0x3c], edi
je 0x49119d
mov ecx, dword [esp + 0x4c]
xor esi, esi
cmp ecx, edi
mov edx, eax
mov dword [esp + 0x20], edx
mov dword [esp + 0x18], esi
jle 0x491180
mov edi, edi
mov edi, 0xd
cmp di, word [eax + esi*2]
jne 0x491177
mov edi, 0xa
cmp di, word [eax + esi*2 + 2]
je 0x49117c
inc esi
cmp esi, ecx
jl 0x491160
mov dword [esp + 0x18], esi
lea eax, [eax + esi*2 + 4]
mov dword [esp + 0x40], eax
mov eax, 0xfffffffe
sub eax, esi
add ecx, eax
mov dword [esp + 0x50], esi
mov dword [esp + 0x4c], ecx
xor edi, edi
jmp 0x4911d2
mov ecx, dword [esp + 0x1c]
mov edx, dword [ecx + 0xa4]
mov ecx, dword [esp + 0x28]
mov edx, dword [edx + 0x2e0]
mov eax, ecx
shl eax, 5
add eax, edx
mov edx, dword [eax + 8]
mov dword [esp + 0x20], edx
cmp ecx, dword [esp + 0x34]
jne 0x4911cb
mov esi, dword [esp + 0x44]
jmp 0x4911ce
mov esi, dword [eax]
dec esi
mov dword [esp + 0x18], esi
cmp esi, edi
jle 0x491203
lea eax, [edx + esi*2 - 2]
lea ebx, [ebx]
movzx ecx, word [eax]
mov edx, 0x20
cmp dx, cx
je 0x4911f7
mov edx, 9
cmp dx, cx
jne 0x4911ff
dec esi
sub eax, 2
cmp esi, edi
jg 0x4911e0
mov dword [esp + 0x18], esi
cmp esi, edi
mov dword [esp + 0x30], edi
jle 0x49138f
nop
mov eax, dword [esp + 0x20]
movzx eax, word [eax + edi*2]
mov ecx, 9
cmp cx, ax
jne 0x49123f
mov edx, dword [esp + 0x1c]
mov eax, dword [edx + 0xa4]
mov ecx, dword [eax + 0x10c]
xor eax, eax
cdq
idiv ecx
sub ecx, edx
add dword [esp + 0x24], ecx
jmp 0x49124d
mov ecx, 0x20
cmp cx, ax
jne 0x49125b
inc dword [esp + 0x24]
inc edi
cmp edi, esi
jl 0x491210
mov dword [esp + 0x30], edi
jmp 0x49138f
cmp edi, esi
mov edx, dword [esp + 0x24]
mov dword [esp + 0x30], edi
mov dword [esp + 0x10], edx
jge 0x49138f
nop
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x30]
movzx eax, word [eax + ecx*2]
mov edx, 9
cmp dx, ax
jne 0x4912ac
mov eax, dword [esp + 0x1c]
mov ecx, dword [eax + 0xa4]
mov edi, dword [esp + 0x10]
mov ecx, dword [ecx + 0x10c]
mov eax, edi
cdq
idiv ecx
sub ecx, edx
add edi, ecx
mov dword [esp + 0x10], edi
jmp 0x49137e
test byte [0x589d03], 1
movzx eax, ax
jne 0x4913de
movzx edx, ax
movzx eax, ax
cmp word [eax*2 + 0x589d10], 0
mov dword [esp + 0x38], edx
jne 0x49130e
mov edx, dword [0x5a9d14]
lea eax, [esp + 0x78]
push eax
push 1
lea ecx, [esp + 0x40]
push ecx
push edx
call dword [0x53d21c]
cmp dword [0x589d08], 0
je 0x4912fc
mov eax, dword [0x589cec]
sub dword [esp + 0x78], eax
movzx eax, word [esp + 0x38]
mov cx, word [esp + 0x78]
mov word [eax*2 + 0x589d10], cx
cmp word [0x589e00], 0
movzx edi, word [eax*2 + 0x589d10]
mov eax, 0x78
mov dword [esp + 0x5c], eax
jne 0x491369
mov ecx, dword [0x5a9d14]
lea edx, [esp + 0x70]
push edx
push 1
lea eax, [esp + 0x64]
push eax
push ecx
call dword [0x53d21c]
cmp dword [0x589d08], 0
je 0x491355
mov edx, dword [0x589cec]
sub dword [esp + 0x70], edx
mov eax, dword [esp + 0x5c]
mov dx, word [esp + 0x70]
movzx ecx, ax
mov word [ecx*2 + 0x589d10], dx
movzx eax, ax
movzx ecx, word [eax*2 + 0x589d10]
add ecx, ecx
cmp edi, ecx
jge 0x4913ed
inc dword [esp + 0x10]
mov eax, dword [esp + 0x30]
inc eax
cmp eax, esi
mov dword [esp + 0x30], eax
jl 0x491270
cmp dword [esp + 0x3c], 0
je 0x491402
mov eax, dword [esp + 0x30]
cmp eax, dword [esp + 0x50]
mov edi, dword [esp + 0x10]
mov dword [esp + 0x38], edi
jge 0x491416
jmp 0x4913b0
mov edx, dword [esp + 0x20]
mov ecx, 9
cmp cx, word [edx + eax*2]
jne 0x4913f4
mov eax, dword [esp + 0x1c]
mov ecx, dword [eax + 0xa4]
mov ecx, dword [ecx + 0x10c]
mov eax, edi
cdq
idiv ecx
mov eax, dword [esp + 0x30]
sub ecx, edx
add edi, ecx
jmp 0x4913f5
add eax, 0xffffd180
mov edx, 0xcc59
cmp ax, dx
ja 0x49137a
add dword [esp + 0x10], 2
jmp 0x49137e
inc edi
inc eax
cmp eax, dword [esp + 0x50]
mov dword [esp + 0x30], eax
jl 0x4913b0
jmp 0x491412
mov edx, dword [esp + 0x1c]
mov eax, dword [edx + 0xa4]
mov edi, dword [eax + 0xdc]
mov dword [esp + 0x38], edi
xor edx, edx
test esi, esi
jle 0x491446
mov eax, dword [ebp + 8]
cmp eax, 2
jne 0x491430
mov edx, edi
sub edx, dword [esp + 0x10]
add edx, dword [esp + 0x24]
jmp 0x491446
cmp eax, 1
jne 0x491446
mov eax, edi
sub eax, dword [esp + 0x10]
add eax, dword [esp + 0x24]
cdq
sub eax, edx
mov edx, eax
sar edx, 1
xor edi, edi
test edx, edx
jle 0x491475
mov ecx, dword [esp + 0x2c]
mov eax, 0x20
movzx esi, ax
lea edi, [ecx + ebx*2]
mov eax, esi
shl esi, 0x10
or eax, esi
mov ecx, edx
shr ecx, 1
rep stosd dword es:[edi], eax
adc ecx, ecx
add ebx, edx
rep stosw word es:[edi], ax
mov dword [esp + 0x14], ebx
mov edi, edx
mov ecx, dword [esp + 0x18]
xor esi, esi
test ecx, ecx
jle 0x491612
mov edx, dword [esp + 0x20]
movzx eax, word [edx + esi*2]
mov edx, 9
cmp dx, ax
je 0x49149f
mov edx, 0x20
cmp dx, ax
jne 0x4914a9
inc esi
cmp esi, ecx
jl 0x491483
jmp 0x491612
cmp esi, ecx
jge 0x491612
mov eax, dword [esp + 0x20]
movzx eax, word [eax + esi*2]
mov ecx, 9
cmp cx, ax
jne 0x49151a
mov edx, dword [esp + 0x1c]
mov eax, dword [edx + 0xa4]
mov ecx, dword [eax + 0x10c]
mov eax, edi
cdq
idiv ecx
sub ecx, edx
mov edx, ecx
add edi, edx
mov dword [esp + 0x10], edi
test edx, edx
jle 0x491607
mov ecx, dword [esp + 0x2c]
lea edi, [ecx + ebx*2]
mov eax, 0x20
movzx ebx, ax
mov eax, ebx
shl ebx, 0x10
or eax, ebx
mov ebx, dword [esp + 0x14]
mov ecx, edx
shr ecx, 1
rep stosd dword es:[edi], eax
adc ecx, ecx
rep stosw word es:[edi], ax
mov edi, dword [esp + 0x10]
add ebx, edx
jmp 0x491603
test byte [0x589d03], 1
movzx eax, ax
jne 0x491834
movzx edx, ax
movzx eax, ax
cmp word [eax*2 + 0x589d10], 0
mov dword [esp + 0x5c], edx
jne 0x49157c
mov edx, dword [0x5a9d14]
lea eax, [esp + 0x68]
push eax
push 1
lea ecx, [esp + 0x64]
push ecx
push edx
call dword [0x53d21c]
cmp dword [0x589d08], 0
je 0x49156a
mov eax, dword [0x589cec]
sub dword [esp + 0x68], eax
movzx eax, word [esp + 0x5c]
mov cx, word [esp + 0x68]
mov word [eax*2 + 0x589d10], cx
cmp word [0x589e00], 0
movzx edx, word [eax*2 + 0x589d10]
mov eax, 0x78
mov dword [esp + 0x24], edx
mov dword [esp + 0x30], eax
jne 0x4915da
mov edx, dword [0x5a9d14]
lea eax, [esp + 0x60]
push eax
push 1
lea ecx, [esp + 0x38]
push ecx
push edx
call dword [0x53d21c]
cmp dword [0x589d08], 0
je 0x4915c6
mov eax, dword [0x589cec]
sub dword [esp + 0x60], eax
mov eax, dword [esp + 0x30]
mov dx, word [esp + 0x60]
movzx ecx, ax
mov word [ecx*2 + 0x589d10], dx
movzx eax, ax
movzx ecx, word [eax*2 + 0x589d10]
add ecx, ecx
cmp dword [esp + 0x24], ecx
jge 0x491847
inc edi
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x2c]
mov cx, word [eax + esi*2]
mov word [edx + ebx*2], cx
inc ebx
mov dword [esp + 0x14], ebx
inc esi
cmp esi, dword [esp + 0x18]
jl 0x4914b1
cmp dword [esp + 0x3c], 0
je 0x491682
mov eax, dword [esp + 0x1c]
mov ecx, dword [eax + 0xa4]
mov edx, dword [ecx + 0x1a8]
mov eax, dword [esp + 0x28]
mov esi, dword [ecx + 0x2e0]
mov ecx, dword [ecx + 0x198]
add edx, eax
shl edx, 5
mov edx, dword [edx + esi]
dec edx
lea esi, [eax + eax*2]
cmp dword [ecx + esi*4 + 4], edx
jge 0x491686
cmp edi, dword [esp + 0x38]
jge 0x491686
mov edx, dword [esp + 0x2c]
mov eax, dword [esp + 0x38]
sub eax, edi
lea esi, [edx + ebx*2]
mov edx, eax
mov eax, 0x20
mov edi, esi
movzx esi, ax
mov eax, esi
shl esi, 0x10
or eax, esi
mov ecx, edx
shr ecx, 1
rep stosd dword es:[edi], eax
adc ecx, ecx
add ebx, edx
rep stosw word es:[edi], ax
mov dword [esp + 0x14], ebx
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x34]
cmp eax, ecx
jl 0x491695
cmp dword [esp + 0x3c], 0
je 0x4916b1
mov edx, dword [esp + 0x2c]
mov esi, 0xd
mov word [edx + ebx*2], si
inc ebx
mov esi, 0xa
mov word [edx + ebx*2], si
inc ebx
mov dword [esp + 0x14], ebx
inc eax
cmp eax, ecx
mov dword [esp + 0x28], eax
jle 0x491136
mov eax, dword [esp + 0x58]
push eax
call fcn.004d7727
mov edx, dword [esp + 0x30]
xor ecx, ecx
add esp, 4
mov word [edx + ebx*2], cx
cmp dword [esp + 0x3c], ecx
je 0x49184f
mov edi, dword [esp + 0x1c]
mov eax, dword [edi + 0xa4]
mov ecx, dword [eax + 0x1a8]
mov edx, dword [eax + 0x2e0]
mov eax, dword [eax + 0x198]
shl ecx, 5
mov esi, dword [ecx + edx]
add ecx, edx
mov edx, dword [ecx + 8]
mov ecx, dword [esp + 0x48]
lea ecx, [ecx + ecx*2]
mov eax, dword [eax + ecx*4]
dec esi
cmp eax, esi
mov dword [esp + 0x54], eax
jl 0x49171b
mov eax, esi
mov ecx, dword [edi + 0xa4]
mov ecx, dword [ecx + 0x10c]
push ecx
push eax
push edx
call fcn.00473a50
mov ecx, dword [esp + 0x60]
sub eax, dword [edi + 0x7c]
add esp, 0xc
cmp ecx, esi
jle 0x491741
sub ecx, esi
add eax, ecx
mov ecx, dword [0x589ce0]
imul ecx, eax
mov eax, dword [edi + 0xa4]
mov edx, dword [eax + 0x1ac]
mov dword [esp + 0x54], ecx
mov ecx, dword [eax + 0x1a8]
sub ecx, dword [edi + 0x78]
shl edx, 5
imul ecx, dword [0x589ccc]
mov dword [esp + 0x58], ecx
mov ecx, dword [eax + 0x2e0]
mov esi, dword [ecx + edx]
mov eax, dword [eax + 0x198]
add ecx, edx
mov edx, dword [ecx + 8]
mov ecx, dword [esp + 0x34]
lea ecx, [ecx + ecx*2]
add ecx, ecx
add ecx, ecx
mov dword [esp + 0x5c], ecx
mov ecx, dword [eax + ecx + 4]
dec esi
cmp ecx, esi
mov dword [esp + 0x44], ecx
jl 0x4917a3
mov ecx, esi
mov eax, dword [edi + 0xa4]
mov eax, dword [eax + 0x10c]
push eax
push ecx
push edx
call fcn.00473a50
sub eax, dword [edi + 0x7c]
add esp, 0xc
cmp dword [esp + 0x44], esi
jle 0x4917cb
mov ecx, dword [esp + 0x44]
sub ecx, esi
add eax, ecx
mov ecx, dword [edi + 0xa4]
mov edx, dword [ecx + 0x198]
mov esi, dword [esp + 0x5c]
mov edx, dword [edx + esi + 8]
mov esi, dword [ecx + 0x1ac]
sub esi, dword [edi + 0x78]
add edx, eax
imul edx, dword [0x589ce0]
imul esi, dword [0x589ccc]
mov eax, dword [esp + 0x2c]
push 1
push 0
push 1
push ebx
push eax
mov ecx, edi
mov dword [esp + 0x70], edx
call fcn.0048d250
mov ecx, dword [esp + 0x5c]
mov edx, dword [esp + 0x58]
mov eax, dword [esp + 0x54]
push 1
push esi
push ecx
push edx
push eax
mov ecx, edi
call fcn.0048ecd0
mov ecx, edi
call fcn.0048a190
jmp 0x49193e
add eax, 0xffffd180
mov edx, 0xcc59
cmp ax, dx
ja 0x4915f1
add edi, 2
jmp 0x4915f2
mov esi, dword [esp + 0x1c]
mov ecx, dword [esi + 0x88]
mov edx, dword [esp + 0x2c]
mov edi, dword [esp + 0x34]
mov eax, dword [esp + 0x48]
push ecx
mov ecx, dword [esp + 0x58]
push ebx
mov ebx, dword [esp + 0x4c]
push edx
push edi
push ebx
push eax
push ecx
mov ecx, dword [esi + 0xa4]
call fcn.004715c0
test ebx, ebx
jle 0x491898
mov edx, dword [esi + 0xa4]
mov ecx, dword [edx + 0x2e0]
mov eax, edi
shl eax, 5
mov ebx, dword [ecx + eax]
dec ebx
mov eax, dword [esi + 0xa4]
cmp dword [eax + 0x100], 0
push 0
push 0
je 0x4918fe
mov ecx, dword [esp + 0x50]
mov edx, dword [esp + 0x5c]
mov dword [eax + 0x180], ecx
mov ecx, 1
mov dword [eax + 0x190], ecx
mov dword [eax + 0x100], ecx
mov dword [eax + 0x184], edx
mov dword [eax + 0x18c], ebx
mov dword [eax + 0x188], edi
mov edx, dword [esi + 0xa4]
mov dword [edx + 0x168], edi
mov eax, dword [esi + 0xa4]
push ecx
mov ecx, esi
mov dword [eax + 0x16c], ebx
call fcn.004898c0
jmp 0x49193e
push 0
mov ecx, esi
call fcn.004898c0
cmp dword [esi + 0x74], 0
mov edi, dword [0x5b35e8]
jle 0x49191d
mov dword [0x5b35e8], 1
mov ecx, dword [esi + 0x134]
add ecx, dword [esi + 0x64]
mov edx, dword [esi + 0x130]
add edx, dword [esi + 0x60]
push ecx
push edx
mov ecx, esi
call fcn.0048b730
mov dword [0x5b35e8], edi
mov eax, dword [esp + 0x2c]
push eax
call fcn.004d7727
add esp, 4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4