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

Disassembly:
sub esp, 0x114
push ebx
push esi
push edi
push ebp
mov eax, dword [ecx + 0x354]
mov ebp, ecx
test eax, eax
jle 0x50bb0b
call fcn.00508d50
movsx eax, word [ebp + 0x12a]
movsx ecx, word [ebp + 0x12c]
mov dword [esp + 0x40], eax
mov dword [esp + 0x5c], ecx
movsx eax, word [ebp + 0x116]
movsx ecx, word [ebp + 0x118]
add eax, 5
mov dword [esp + 0x78], eax
lea edx, [ecx*2 + 0xc]
mov eax, dword [ebp + 0x104]
mov bl, byte [esp + 0x128]
mov dword [esp + 0x88], edx
nop
mov edx, dword [eax + 0xc]
mov ecx, dword [eax + 8]
mov dword [esp + 0x70], ecx
mov dword [esp + 0x6c], edx
xor edx, edx
mov byte [ebp + 0x140], bl
cmp word [eax + 0x8d90], dx
jle 0x50bb9b
xor esi, esi
xor ecx, ecx
mov eax, dword [ebp + 0x104]
add esi, 0x198
inc edx
nop
mov byte [eax + esi - 0xc7], cl
mov eax, dword [ebp + 0x104]
movsx ebx, word [eax + 0x8d90]
cmp ebx, edx
jg 0x50bb75
mov eax, dword [ebp + 0x100]
mov ecx, dword [eax + 0xd0]
mov dword [esp + 0x10], ecx
mov edx, dword [eax + 0xd4]
mov eax, dword [ebp + 0x334]
mov dword [esp + 0x68], edx
mov dword [0x564408], eax
mov ecx, dword [ebp + 0x334]
call fcn.005101c0
mov ecx, dword [ebp + 0x100]
mov dword [esp + 0x60], 0xffffffff
mov eax, dword [ecx + 0x38]
test eax, eax
je 0x50bbfa
mov eax, dword [ebp + 0x104]
mov cl, byte [eax + 0x8db8]
test cl, cl
jne 0x50bbfa
mov dword [esp + 0x14], 0
jmp 0x50bc02
mov dword [esp + 0x14], 1
mov dword [esp + 0x44], 0
mov eax, dword [esp + 0x88]
test eax, eax
jle 0x50c3ee
mov eax, dword [esp + 0x40]
lea eax, [eax + eax*2]
shl eax, 3
mov dword [esp + 0x7c], eax
mov eax, dword [esp + 0x5c]
shl eax, 2
mov dword [esp + 0x84], eax
mov eax, dword [esp + 0x40]
shl eax, 2
mov dword [esp + 0x80], eax
mov eax, dword [esp + 0x40]
mov ecx, dword [esp + 0x5c]
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], ecx
mov eax, dword [esp + 0x44]
and al, 3
cmp al, 3
jne 0x50bc6d
mov eax, dword [0x5694d0]
test eax, eax
je 0x50bc6d
mov ecx, eax
call fcn.00508000
mov eax, dword [esp + 0x44]
and eax, 1
mov dword [esp + 0x20], eax
cmp eax, 1
jne 0x50bc90
mov eax, dword [ebp + 0x2d4]
test eax, eax
je 0x50bc90
push 0
mov ecx, ebp
call fcn.00509990
mov dword [esp + 0x58], 0
mov eax, dword [esp + 0x78]
test eax, eax
jle 0x50c38c
mov eax, dword [esp + 0x80]
mov ecx, dword [esp + 0x84]
mov edx, dword [esp + 0x7c]
mov dword [esp + 0x74], eax
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x54], edx
mov eax, dword [esp + 0x3c]
test eax, eax
jl 0x50c344
mov eax, dword [esp + 0x54]
test eax, eax
jl 0x50c344
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x6c]
cmp eax, ecx
jge 0x50c33c
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x70]
cmp eax, ecx
jge 0x50c33c
mov edx, dword [ebp + 0x104]
mov ecx, dword [esp + 0x3c]
mov esi, dword [esp + 0x54]
mov eax, dword [edx + 0x8d8c]
add esi, dword [eax + ecx]
mov eax, dword [ebp + 0x130]
movsx edi, word [esi]
sub edi, eax
mov ecx, dword [ebp + 0x134]
movsx eax, word [esi + 2]
sub eax, ecx
mov dword [esp + 0x18], eax
movsx eax, word [ebp + 0x108]
add eax, edi
mov dword [esp + 0x24], eax
xor eax, eax
mov al, byte [esi + 4]
lea ebx, [eax + eax*2]
mov eax, dword [esp + 0x18]
movsx ecx, word [edx + ebx*2 + 0x1a]
add eax, ecx
mov ecx, dword [esp + 0x3c]
mov ebx, dword [ecx + 0x56cff8]
mov ecx, dword [esp + 0x68]
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x74]
mov eax, dword [ebx + eax]
test eax, ecx
je 0x50bd6d
mov bl, 0xf
jmp 0x50bd96
mov ecx, dword [esp + 0x10]
test eax, ecx
jne 0x50bd87
mov eax, dword [esp + 0x14]
test eax, eax
jne 0x50bd87
xor bl, bl
mov byte [esi + 7], bl
jmp 0x50c257
cmp byte [edx + 0x8db9], 1
sbb bl, bl
and bl, 0x8f
add bl, 0x80
mov eax, dword [ebp + 0x94]
cmp eax, edi
jl 0x50c257
mov eax, dword [esp + 0x18]
mov ecx, dword [ebp + 0x98]
cmp ecx, eax
jl 0x50c257
mov eax, dword [esp + 0x24]
mov ecx, dword [ebp + 0x8c]
cmp ecx, eax
jge 0x50c257
mov eax, dword [esp + 0x28]
mov ecx, dword [ebp + 0x90]
cmp ecx, eax
jge 0x50c257
mov cl, byte [esi + 5]
mov eax, dword [ebp + 0xf8]
and cl, 0x1f
test eax, eax
je 0x50be09
xor eax, eax
mov al, cl
movsx ecx, word [edx + 0x8d90]
cmp ecx, eax
jle 0x50be09
lea ecx, [eax + eax*4]
lea ecx, [ecx + ecx*4]
lea eax, [eax + ecx*2]
inc byte [edx + eax*8 + 0xd1]
mov dword [esp + 0x1c], 0xffffffff
mov dword [esp + 0x2c], 0
mov dword [esp + 0x38], 0
mov al, byte [ebp + 0x142]
test al, al
je 0x50bf46
mov al, byte [esi + 7]
cmp al, bl
jne 0x50bf46
cmp bl, 0xf
jne 0x50be8e
mov eax, dword [ebp + 0x104]
mov cl, byte [eax + 0x8db9]
test cl, cl
jne 0x50be59
mov dword [esp + 0x1c], 0
jmp 0x50be7d
mov eax, dword [esp + 0x68]
mov ecx, dword [esp + 0x6c]
mov edx, dword [esp + 0x70]
push eax
mov eax, dword [esp + 0x38]
push ecx
mov ecx, dword [esp + 0x38]
push edx
push eax
push ecx
mov ecx, ebp
call fcn.0050d410
mov dword [esp + 0x1c], eax
xor eax, eax
mov ecx, dword [esp + 0x1c]
mov al, byte [esi + 8]
cmp eax, ecx
jne 0x50bf46
mov eax, dword [ebp + 0x29c]
test eax, eax
je 0x50c257
mov eax, dword [ebp + 0x2a0]
test eax, eax
je 0x50beec
mov eax, dword [ebp + 0x2bc]
cmp eax, edi
jl 0x50bee4
mov eax, dword [esp + 0x24]
mov ecx, dword [ebp + 0x2b4]
cmp ecx, eax
jg 0x50bee4
mov eax, dword [esp + 0x18]
mov ecx, dword [ebp + 0x2c0]
cmp ecx, eax
jl 0x50bee4
mov eax, dword [esp + 0x28]
mov ecx, dword [ebp + 0x2b8]
cmp ecx, eax
jg 0x50bee4
mov dword [esp + 0x38], 1
jmp 0x50beec
mov dword [esp + 0x38], 0
mov eax, dword [ebp + 0x2ac]
cmp eax, edi
jl 0x50bf2a
mov eax, dword [esp + 0x24]
mov ecx, dword [ebp + 0x2a4]
cmp ecx, eax
jg 0x50bf2a
mov eax, dword [esp + 0x18]
mov ecx, dword [ebp + 0x2b0]
cmp ecx, eax
jl 0x50bf2a
mov eax, dword [esp + 0x28]
mov ecx, dword [ebp + 0x2a8]
cmp ecx, eax
jg 0x50bf2a
mov dword [esp + 0x2c], 1
jmp 0x50bf46
mov eax, dword [esp + 0x38]
test eax, eax
je 0x50c257
mov dword [esp + 0x38], 0
mov dword [esp + 0x2c], 2
xor eax, eax
mov ecx, dword [ebp + 0x184]
mov al, byte [esi + 4]
mov edx, dword [ecx + eax*4]
mov eax, dword [ebp + 0x104]
mov dword [esp + 0x24], edx
mov cl, byte [eax + 0x8db9]
test cl, cl
jne 0x50bf70
mov dword [esp + 0x1c], 0
mov eax, dword [esp + 0x1c]
cmp eax, 0xffffffff
jne 0x50bfac
cmp bl, 0xf
jne 0x50bfa4
mov eax, dword [esp + 0x68]
mov ecx, dword [esp + 0x6c]
mov edx, dword [esp + 0x70]
push eax
mov eax, dword [esp + 0x38]
push ecx
mov ecx, dword [esp + 0x38]
push edx
push eax
push ecx
mov ecx, ebp
call fcn.0050d410
mov dword [esp + 0x1c], eax
jmp 0x50bfac
mov dword [esp + 0x1c], 0
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x24]
cmp bl, 0x80
mov edx, dword [ecx + eax*8]
mov dword [esp + 0x28], edx
mov edx, dword [ecx + eax*8 + 4]
mov dword [esp + 0x48], edx
jne 0x50bfe0
mov dword [esp + 0x4c], 1
mov dword [esp + 0x50], 0
mov eax, dword [ecx]
mov dword [esp + 0x48], eax
jmp 0x50bffa
cmp dword [esp + 0x28], 1
sbb eax, eax
inc eax
mov dword [esp + 0x50], eax
mov eax, dword [esp + 0x48]
cmp eax, 1
sbb eax, eax
inc eax
mov dword [esp + 0x4c], eax
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x60]
cmp ecx, eax
je 0x50c112
test eax, eax
jne 0x50c05c
mov eax, dword [ebp + 0x98]
mov ecx, dword [ebp + 0x94]
push eax
mov edx, dword [ebp + 0x90]
push ecx
mov eax, dword [ebp + 0x8c]
push edx
mov ecx, dword [ebp + 0x178]
push eax
call fcn.0046afb0
mov ecx, dword [ebp + 0x98]
mov edx, dword [ebp + 0x94]
push ecx
mov eax, dword [ebp + 0x90]
push edx
mov ecx, dword [ebp + 0x8c]
push eax
push ecx
mov ecx, dword [ebp + 0x17c]
call fcn.0046afb0
mov eax, dword [esp + 0x2c]
cmp eax, 1
jne 0x50c0b3
mov eax, dword [ebp + 0x2b0]
mov ecx, dword [ebp + 0x2ac]
push eax
mov edx, dword [ebp + 0x2a8]
push ecx
mov eax, dword [ebp + 0x2a4]
push edx
mov ecx, dword [ebp + 0x178]
push eax
call fcn.0046afb0
mov ecx, dword [ebp + 0x2b0]
mov edx, dword [ebp + 0x2ac]
push ecx
mov eax, dword [ebp + 0x2a8]
push edx
mov ecx, dword [ebp + 0x2a4]
push eax
push ecx
mov ecx, dword [ebp + 0x17c]
call fcn.0046afb0
mov eax, dword [esp + 0x2c]
cmp eax, 2
jne 0x50c10a
mov eax, dword [ebp + 0x2c0]
mov ecx, dword [ebp + 0x2bc]
push eax
mov edx, dword [ebp + 0x2b8]
push ecx
mov eax, dword [ebp + 0x2b4]
push edx
mov ecx, dword [ebp + 0x178]
push eax
call fcn.0046afb0
mov ecx, dword [ebp + 0x2c0]
mov edx, dword [ebp + 0x2bc]
push ecx
mov eax, dword [ebp + 0x2b8]
push edx
mov ecx, dword [ebp + 0x2b4]
push eax
push ecx
mov ecx, dword [ebp + 0x17c]
call fcn.0046afb0
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x60], eax
mov eax, dword [esp + 0x50]
test eax, eax
je 0x50c130
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x28]
push eax
push edi
push ecx
mov ecx, dword [ebp + 0x178]
call fcn.0046b700
mov eax, dword [esp + 0x4c]
test eax, eax
je 0x50c14e
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x48]
push eax
push edi
push ecx
mov ecx, dword [ebp + 0x17c]
call fcn.0046b700
mov eax, dword [esp + 0x38]
test eax, eax
je 0x50c1ec
mov eax, dword [ebp + 0x2c0]
mov ecx, dword [ebp + 0x2bc]
push eax
mov edx, dword [ebp + 0x2b8]
push ecx
mov eax, dword [ebp + 0x2b4]
push edx
mov ecx, dword [ebp + 0x178]
push eax
call fcn.0046afb0
mov ecx, dword [ebp + 0x2c0]
mov edx, dword [ebp + 0x2bc]
push ecx
mov eax, dword [ebp + 0x2b8]
push edx
mov ecx, dword [ebp + 0x2b4]
push eax
push ecx
mov ecx, dword [ebp + 0x17c]
call fcn.0046afb0
mov dword [esp + 0x60], 2
mov ecx, dword [esp + 0x50]
test ecx, ecx
je 0x50c1ce
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x28]
push eax
push edi
push ecx
mov ecx, dword [ebp + 0x178]
call fcn.0046b700
mov eax, dword [esp + 0x4c]
test eax, eax
je 0x50c1ec
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x48]
push eax
push edi
push ecx
mov ecx, dword [ebp + 0x17c]
call fcn.0046b700
mov cl, byte [esi + 5]
xor eax, eax
and cl, 0x1f
mov al, cl
mov edx, eax
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
lea eax, [edx + eax*2]
mov edx, dword [ebp + 0x104]
mov ax, word [edx + eax*8 + 0x144]
cmp ax, 0xffff
je 0x50c217
mov cl, al
mov al, byte [esp + 0x1c]
mov byte [esi + 7], bl
mov byte [esi + 8], al
mov eax, dword [esp + 0x4c]
push eax
mov byte [esi + 9], bl
mov dl, byte [esi + 0xa]
mov eax, dword [esp + 0x38]
and dl, 0xbf
mov byte [esi + 0xa], dl
mov edx, dword [esp + 0x54]
push edx
push ebx
mov edx, dword [esp + 0x3c]
push eax
mov eax, dword [esp + 0x28]
push edx
push eax
push edi
push ecx
push esi
mov ecx, ebp
call fcn.0050d5a0
inc dword [0x569554]
test esi, esi
je 0x50c344
mov al, byte [esi + 0xa]
test al, 0x40
je 0x50c2b3
mov cl, byte [esi + 5]
xor eax, eax
and cl, 0x1f
mov al, cl
mov edx, eax
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
lea eax, [edx + eax*2]
mov edx, dword [ebp + 0x104]
mov ax, word [edx + eax*8 + 0x144]
cmp ax, 0xffff
je 0x50c291
mov cl, al
mov eax, dword [esp + 0x34]
push 1
mov edx, dword [esp + 0x34]
push 1
push ebx
push eax
mov eax, dword [esp + 0x28]
push edx
push eax
push edi
push ecx
push esi
mov ecx, ebp
call fcn.0050d5a0
and byte [esi + 0xa], 0xbf
test esi, esi
je 0x50c344
mov dword [0x564404], 1
test bl, bl
jne 0x50c2d8
push 0
mov ecx, dword [ebp + 0x334]
push 0
call fcn.0050fc10
cmp bl, 0xf
je 0x50c2e7
mov dword [0x564400], 1
mov ecx, dword [ebp + 0x320]
cmp bl, 0x80
sete al
push eax
mov al, byte [esi + 5]
shr al, 5
and eax, 0xffff00ff
imul ax, word [ebp + 0x10e]
add ax, word [esp + 0x1c]
push eax
push edi
push ecx
lea ecx, [esi + 0xc]
call fcn.0052eb00
push 0x28
mov ecx, dword [ebp + 0x334]
push 0
call fcn.0050fc10
mov dword [0x564400], 0
mov dword [0x564404], 0
jmp 0x50c344
mov eax, dword [esp + 0x78]
mov dword [esp + 0x58], eax
mov eax, dword [esp + 0x74]
mov ecx, dword [esp + 0x54]
add eax, 4
add ecx, 0x18
mov edx, dword [esp + 0x30]
mov ebx, dword [esp + 0x3c]
inc edx
add ebx, 4
mov esi, dword [esp + 0x34]
mov edi, dword [esp + 0x58]
inc esi
inc edi
mov dword [esp + 0x74], eax
mov dword [esp + 0x54], ecx
mov eax, dword [esp + 0x78]
mov dword [esp + 0x30], edx
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x34], esi
mov dword [esp + 0x58], edi
cmp eax, edi
jg 0x50bcc2
mov eax, dword [esp + 0x20]
cmp eax, 1
je 0x50c3bc
mov eax, dword [esp + 0x7c]
mov ecx, dword [esp + 0x80]
sub eax, 0x18
sub ecx, 4
mov edx, dword [esp + 0x40]
mov dword [esp + 0x7c], eax
dec edx
mov dword [esp + 0x80], ecx
mov dword [esp + 0x40], edx
jmp 0x50c3d6
mov eax, dword [esp + 0x84]
mov ecx, dword [esp + 0x5c]
add eax, 4
inc ecx
mov dword [esp + 0x84], eax
mov dword [esp + 0x5c], ecx
mov eax, dword [esp + 0x44]
mov ecx, dword [esp + 0x88]
inc eax
mov dword [esp + 0x44], eax
cmp ecx, eax
jg 0x50bc43
mov eax, dword [ebp + 0x2d4]
test eax, eax
je 0x50c40b
push 1
mov ecx, ebp
call fcn.00509990
mov eax, dword [ebp + 0x2d4]
test eax, eax
jne 0x50c3f8
mov eax, dword [0x5694d0]
test eax, eax
je 0x50c41b
mov ecx, eax
call fcn.00508000
mov edi, dword [esp + 0x12c]
mov eax, dword [ebp + 0x8c]
add eax, edi
mov ecx, dword [esp + 0x130]
mov edx, dword [ebp + 0x90]
mov ebx, dword [ebp + 0x94]
add edx, ecx
add ebx, edi
mov esi, dword [ebp + 0x98]
mov dword [ebp + 0x8c], eax
add esi, ecx
mov dword [ebp + 0x90], edx
mov dword [ebp + 0x94], ebx
mov dword [ebp + 0x98], esi
mov dword [0x564404], 1
mov al, byte [ebp + 0x168]
cmp al, 2
jne 0x50c4c0
push 0
push 0xff
push 0x28
mov eax, dword [ebp + 0x170]
push 0
sub eax, ecx
mov edx, dword [esp + 0x13c]
push 0
push 0
push 0
push eax
mov eax, dword [ebp + 0x16c]
sub eax, edx
push eax
mov eax, dword [ebp + 0xc8]
sub eax, ecx
mov ecx, dword [ebp + 0x334]
push eax
mov eax, dword [ebp + 0xc4]
sub eax, edx
push eax
push 0x14
push 4
call fcn.0050ffa0
mov eax, dword [0x5681d8]
mov eax, dword [eax + 0x1b4]
cmp eax, 1
je 0x50c4da
cmp eax, 7
jl 0x50c4e1
cmp eax, 8
jg 0x50c4e1
mov ecx, ebp
call fcn.0050a740
mov eax, dword [0x5681d8]
mov ecx, dword [eax + 0x1b4]
cmp ecx, 0x15
jne 0x50c4fc
mov eax, dword [ebp]
mov ecx, ebp
call dword [eax + 0xf8]
mov dword [esp + 0x14], 0
mov eax, dword [ebp + 0x34c]
test eax, eax
je 0x50c5e7
call dword [sym.imp.WINMM.dll_timeGetTime]
mov dword [esp + 0x10], eax
mov esi, dword [ebp + 0x34c]
test esi, esi
je 0x50c5e7
mov eax, dword [esi + 4]
test eax, eax
je 0x50c5dd
mov ecx, dword [esi + 0x20]
test ecx, ecx
jne 0x50c545
mov eax, dword [esp + 0x10]
mov dword [esi + 0x20], eax
jmp 0x50c59b
mov eax, dword [esi + 0x1c]
cmp eax, 1
je 0x50c552
cmp eax, 2
jne 0x50c59b
mov edi, dword [esp + 0x10]
mov eax, dword [esi + 0x24]
sub edi, ecx
cmp eax, edi
ja 0x50c59b
mov ebx, dword [esi + 8]
inc ebx
mov dword [esi + 8], ebx
mov ecx, dword [esi + 4]
call fcn.0046bd40
cmp eax, ebx
jg 0x50c589
mov dword [esi + 8], 0
mov eax, dword [esi + 0x1c]
cmp eax, 2
jne 0x50c589
mov dword [esp + 0x14], 1
mov eax, dword [esi + 0x24]
mov ecx, dword [esi + 0x20]
sub edi, eax
add ecx, eax
mov dword [esi + 0x20], ecx
cmp dword [esi + 0x24], edi
jbe 0x50c55f
mov eax, dword [esi + 0x18]
mov dword [0x580ca8], 0xffffffff
mov dword [0x580cb8], eax
mov eax, dword [esi + 8]
mov ecx, dword [esi + 0x28]
mov edx, dword [esi + 0x14]
push ecx
mov ebx, dword [ebp + 0x134]
push edx
mov edi, dword [ebp + 0x130]
push eax
mov eax, dword [esi + 0x10]
sub eax, ebx
mov ecx, dword [ebp + 0x20]
push eax
mov eax, dword [esi + 0xc]
sub eax, edi
push eax
push ecx
mov ecx, dword [esi + 4]
call fcn.0046c190
mov esi, dword [esi]
test esi, esi
jne 0x50c52a
mov eax, dword [esp + 0x14]
test eax, eax
je 0x50c5f6
mov ecx, ebp
call fcn.0050fa30
xor ecx, ecx
mov edi, dword [esp + 0x12c]
mov edx, dword [esp + 0x130]
mov dword [0x564404], ecx
mov eax, dword [ebp + 0x8c]
mov ebx, dword [ebp + 0x90]
sub eax, edi
sub ebx, edx
mov esi, dword [ebp + 0x94]
mov dword [ebp + 0x8c], eax
sub esi, edi
mov eax, dword [ebp + 0x98]
sub eax, edx
mov dword [ebp + 0x90], ebx
mov edx, dword [ebp + 0x334]
mov dword [ebp + 0x94], esi
mov dword [ebp + 0x98], eax
mov eax, dword [edx + 0x68]
cmp eax, ecx
jle 0x50c6ae
xor edx, edx
mov eax, dword [ebp + 0x334]
mov ebx, dword [eax + 0x58]
mov edi, dword [ebx + edx]
test edi, edi
je 0x50c69f
mov esi, dword [edi + 0x10]
mov eax, dword [ebp + 0x334]
mov ebx, dword [eax + 0x60]
mov ebx, dword [ebx + esi*4]
test ebx, ebx
jne 0x50c68a
mov eax, dword [eax + 0x5c]
mov dword [eax + esi*4], edi
mov ebx, dword [ebp + 0x334]
mov eax, dword [ebx + 0x60]
mov dword [eax + esi*4], edi
jmp 0x50c699
mov dword [ebx + 4], edi
mov eax, dword [ebp + 0x334]
mov ebx, dword [eax + 0x60]
mov dword [ebx + esi*4], edi
mov edi, dword [edi]
test edi, edi
jne 0x50c663
mov eax, dword [ebp + 0x334]
add edx, 4
inc ecx
cmp dword [eax + 0x68], ecx
jg 0x50c653
xor eax, eax
mov ecx, dword [esp + 0x60]
mov dword [0x7de26c], eax
mov dword [0x7de268], eax
cmp ecx, eax
je 0x50c710
mov eax, dword [ebp + 0x98]
mov ecx, dword [ebp + 0x94]
push eax
mov edx, dword [ebp + 0x90]
push ecx
mov eax, dword [ebp + 0x8c]
push edx
mov ecx, dword [ebp + 0x178]
push eax
call fcn.0046afb0
mov ecx, dword [ebp + 0x98]
mov edx, dword [ebp + 0x94]
push ecx
mov eax, dword [ebp + 0x90]
push edx
mov ecx, dword [ebp + 0x8c]
push eax
push ecx
mov ecx, dword [ebp + 0x17c]
call fcn.0046afb0
xor esi, esi
mov eax, dword [ebp + 0x334]
mov ecx, dword [eax + 0x5c]
mov edi, dword [ecx + esi]
test edi, edi
je 0x50c81e
mov eax, dword [edi + 0x10]
test eax, eax
jne 0x50c813
mov eax, dword [edi + 0x2c]
test eax, eax
jne 0x50c813
mov ecx, dword [ebp + 0x178]
mov eax, dword [ecx + 0x64]
mov edx, dword [ecx + 0x5c]
push eax
mov ebx, dword [ecx + 0x60]
push edx
mov eax, dword [ecx + 0x58]
push ebx
mov edx, dword [ecx + 0x40]
push eax
mov ecx, dword [ecx + 0x3c]
push edx
mov eax, dword [ebp + 0x320]
push ecx
mov edx, dword [eax + 0xc0]
push edx
call fcn.0054b720
add esp, 0x1c
mov ecx, dword [edi + 0x28]
push ecx
call fcn.0054b760
add esp, 4
mov ecx, dword [edi + 0x24]
push ecx
call fcn.0054b7a0
add esp, 4
mov ebx, dword [edi + 0xc]
mov eax, dword [edi + 0x1c]
and eax, 0xfe
mov ecx, dword [ebx + 4]
push eax
mov edx, dword [ebx]
push ecx
mov eax, dword [ebx + 0x14]
push edx
mov ecx, dword [ebx + 0x10]
push eax
mov edx, dword [edi + 0x18]
push ecx
mov eax, dword [edi + 0x14]
push edx
mov ecx, dword [edi + 0x20]
push eax
push ecx
call fcn.0054b9a0
add esp, 0x20
mov ecx, dword [ebp + 0x17c]
mov edx, dword [ecx + 0x64]
mov eax, dword [ecx + 0x5c]
push edx
push eax
mov edx, dword [ecx + 0x60]
mov eax, dword [ecx + 0x58]
push edx
push eax
mov edx, dword [ecx + 0x40]
mov eax, dword [ebp + 0x320]
push edx
mov ecx, dword [ecx + 0x3c]
push ecx
mov edx, dword [eax + 0xc0]
push edx
call fcn.0054b720
add esp, 0x1c
mov eax, dword [edi + 0x1c]
or eax, 1
mov ecx, dword [ebx + 4]
push eax
mov edx, dword [ebx]
push ecx
mov eax, dword [ebx + 0x14]
push edx
mov ecx, dword [ebx + 0x10]
push eax
mov edx, dword [edi + 0x18]
push ecx
mov eax, dword [edi + 0x14]
push edx
mov ecx, dword [edi + 0x20]
push eax
push ecx
call fcn.0054b9a0
add esp, 0x20
mov edi, dword [edi + 4]
test edi, edi
jne 0x50c726
add esi, 4
cmp esi, 0x14
jle 0x50c712
mov eax, dword [0x5694d0]
test eax, eax
je 0x50c83a
mov ecx, eax
call fcn.00508000
mov eax, dword [0x5681d8]
mov ecx, dword [eax + 0x1b0]
cmp ecx, 4
jne 0x50ca09
mov eax, dword [ebp + 0x78]
test eax, eax
je 0x50ca09
mov ecx, dword [0x5694d0]
call fcn.00507240
test eax, eax
je 0x50ca09
call dword [sym.imp.WINMM.dll_timeGetTime]
mov esi, eax
mov eax, dword [esp + 0x130]
neg eax
lea ecx, [esp + 0x8c]
push eax
mov eax, dword [esp + 0x130]
neg eax
push eax
push ecx
mov ecx, ebp
call fcn.0050dbe0
test eax, eax
je 0x50ca09
lea eax, [esp + 0x64]
mov ecx, dword [esp + 0x90]
mov edx, dword [esp + 0x8c]
push eax
push 0x28
mov eax, dword [ebp + 0x334]
push 0xa
push ecx
push edx
mov ecx, ebp
push eax
call fcn.0050e6c0
cmp eax, 1
mov eax, dword [ebp + 0x338]
jne 0x50c9c6
test eax, eax
je 0x50c8eb
mov eax, dword [esp + 0x64]
mov ecx, dword [ebp + 0x33c]
cmp ecx, eax
je 0x50ca09
mov eax, dword [esp + 0x64]
mov ecx, dword [ebp + 0x33c]
mov dword [ebp + 0x338], 1
cmp ecx, eax
je 0x50ca09
mov ecx, dword [ebp + 0x100]
mov dword [ebp + 0x33c], eax
lea eax, [esp + 0x14]
lea edx, [esp + 0x10]
mov ebx, dword [esp + 0x64]
push eax
push edx
mov dword [ebp + 0x340], esi
xor esi, esi
push ebx
mov dword [esp + 0x1c], esi
mov dword [esp + 0x20], esi
mov eax, dword [ecx]
call dword [eax + 0x9c]
cmp eax, 1
jne 0x50c99e
mov eax, dword [esp + 0x10]
mov ecx, dword [0x5694d0]
push eax
call fcn.00507e80
cmp dword [ebp + 0x348], esi
je 0x50ca09
mov eax, dword [0x5681d8]
cmp dword [eax + 0xa08], esi
je 0x50ca09
lea eax, [esp + 0xa4]
push 0x7f
mov ecx, dword [esp + 0x18]
push eax
push ecx
mov ecx, ebp
call fcn.00423e10
lea ecx, [esp + 0xa4]
push esi
push esi
push esi
push esi
push 0x70
push ecx
push esi
mov ecx, dword [ebp + 0x348]
call fcn.00406030
jmp 0x50ca09
push 0
mov ecx, dword [0x5694d0]
call fcn.00507e80
mov ecx, dword [ebp + 0x348]
test ecx, ecx
je 0x50ca09
mov eax, dword [0x5681d8]
mov edx, dword [eax + 0xa08]
test edx, edx
je 0x50ca09
jmp 0x50ca04
test eax, eax
je 0x50ca09
mov dword [ebp + 0x338], 0
mov dword [ebp + 0x33c], Ordinal_1
push 0
mov ecx, dword [0x5694d0]
call fcn.00507e80
mov ecx, dword [ebp + 0x348]
test ecx, ecx
je 0x50ca09
mov eax, dword [0x5681d8]
mov edx, dword [eax + 0xa08]
test edx, edx
je 0x50ca09
call fcn.004062e0
mov esi, dword [ebp + 0x58]
test esi, esi
je 0x50caef
mov edi, dword [esi]
mov eax, dword [edi + 0x6c]
test eax, eax
je 0x50cae4
mov eax, dword [edi + 0x38]
test eax, eax
je 0x50cae4
lea eax, [esp + 0x94]
mov ebx, dword [edi]
push eax
mov ecx, edi
call dword [ebx + 0xb8]
mov edx, dword [esp + 0x94]
mov eax, dword [esp + 0x12c]
sub edx, eax
mov ebx, dword [esp + 0x98]
mov ecx, dword [esp + 0x130]
mov eax, dword [esp + 0x9c]
sub ebx, ecx
mov ecx, dword [esp + 0x12c]
sub eax, ecx
mov ecx, dword [esp + 0xa0]
sub ecx, dword [esp + 0x130]
test edx, edx
jge 0x50ca82
xor edx, edx
test ebx, ebx
jge 0x50ca88
xor ebx, ebx
push 0
mov edi, dword [edi + 0xe0]
push edi
push 0x1e
push 0
push 0
push 0
push 0
push ecx
push eax
push ebx
push edx
push ecx
push 3
mov ecx, dword [ebp + 0x334]
call fcn.0050ffa0
test eax, eax
je 0x50cae4
mov edx, dword [ebp + 0x334]
mov ecx, dword [edx + 0x60]
mov ecx, dword [ecx + 0x78]
test ecx, ecx
jne 0x50cad5
mov ecx, dword [edx + 0x5c]
mov dword [ecx + 0x78], eax
mov edx, dword [ebp + 0x334]
mov ebx, dword [edx + 0x60]
mov dword [ebx + 0x78], eax
jmp 0x50cae4
mov dword [ecx + 4], eax
mov ecx, dword [ebp + 0x334]
mov edx, dword [ecx + 0x60]
mov dword [edx + 0x78], eax
mov esi, dword [esi + 8]
test esi, esi
jne 0x50ca14
mov al, byte [ebp + 0x142]
test al, al
jne 0x50cb3b
xor esi, esi
mov eax, dword [ebp + 0x320]
cmp dword [eax + 0x1c], esi
jle 0x50cb2b
push esi
mov eax, dword [ebp + 0x320]
mov ecx, dword [ebp + 0x180]
inc esi
mov eax, dword [eax + 0x18]
dec eax
push eax
push 0
call fcn.0046b080
mov ecx, dword [ebp + 0x320]
cmp dword [ecx + 0x1c], esi
jg 0x50cb06
mov ecx, dword [ebp + 0x330]
call fcn.005101c0
jmp 0x50cdd4
mov eax, dword [ebp + 0x17c]
mov ecx, dword [ebp + 0x178]
push eax
push ecx
mov ecx, dword [ebp + 0x180]
call fcn.0046b750
mov ecx, dword [ebp + 0x29c]
test ecx, ecx
je 0x50cbe6
mov eax, dword [ebp + 0x2a4]
test eax, eax
jl 0x50cb9f
mov esi, dword [ebp + 0x2a8]
mov eax, dword [ebp + 0x2b0]
cmp eax, esi
jl 0x50cb9f
push esi
mov eax, dword [ebp + 0x2ac]
push eax
mov ecx, dword [ebp + 0x2a4]
push ecx
inc esi
mov ecx, dword [ebp + 0x180]
call fcn.0046b080
cmp dword [ebp + 0x2b0], esi
jge 0x50cb7c
mov eax, dword [ebp + 0x2a0]
test eax, eax
je 0x50cbe6
mov eax, dword [ebp + 0x2b4]
test eax, eax
jl 0x50cbe6
mov esi, dword [ebp + 0x2b8]
mov eax, dword [ebp + 0x2c0]
cmp eax, esi
jl 0x50cbe6
push esi
mov eax, dword [ebp + 0x2bc]
push eax
mov ecx, dword [ebp + 0x2b4]
push ecx
inc esi
mov ecx, dword [ebp + 0x180]
call fcn.0046b080
cmp dword [ebp + 0x2c0], esi
jge 0x50cbc3
xor eax, eax
mov ecx, dword [ebp + 0x334]
mov dword [esp + 0x10], eax
cmp dword [ecx + 0x68], eax
jle 0x50cdd4
mov dword [esp + 0x20], eax
mov eax, dword [ebp + 0x334]
mov ecx, dword [esp + 0x20]
mov edx, dword [eax + 0x58]
mov ebx, dword [edx + ecx]
test ebx, ebx
je 0x50ccd8
mov eax, dword [ebx + 0x10]
cmp eax, 5
jle 0x50ccce
mov eax, dword [ebp + 0x330]
mov ecx, dword [esp + 0x20]
mov edx, dword [eax + 0x58]
mov eax, dword [edx + ecx]
mov dword [esp + 0x14], 1
cmp dword [ebx + 0x2c], 1
sbb edx, edx
and edx, 0xfffffff0
add edx, 0x34
test eax, eax
je 0x50cc80
lea edi, [eax + 0xc]
mov ecx, edx
shr ecx, 2
lea esi, [ebx + 0xc]
repe cmpsd dword [esi], dword es:[edi]
jne 0x50cc61
mov ecx, edx
and ecx, 3
repe cmpsb byte [esi], byte es:[edi]
je 0x50cc6b
mov eax, dword [eax]
test eax, eax
jne 0x50cc4b
jmp 0x50cc80
mov dword [esp + 0x14], 0
inc dword [0x7de268]
mov dword [eax + 0x2c], 0xffffffff
mov eax, dword [esp + 0x14]
test eax, eax
je 0x50ccce
mov eax, dword [ebx + 0x2c]
test eax, eax
jne 0x50ccbf
xor ecx, ecx
mov eax, dword [ebx + 0x1c]
and al, 2
mov edx, dword [ebx + 0x18]
cmp al, 2
mov eax, dword [ebx + 0x14]
sete cl
push ecx
push edx
push eax
mov ecx, dword [ebx + 0xc]
push ecx
mov edx, dword [ebx + 0x20]
push edx
mov ecx, dword [ebp + 0x180]
call fcn.0046b490
inc dword [0x7de26c]
jmp 0x50ccce
mov eax, dword [ebp + 0x180]
mov ecx, ebp
push eax
push ebx
call fcn.0050d100
mov ebx, dword [ebx]
test ebx, ebx
jne 0x50cc17
mov eax, dword [ebp + 0x330]
mov ecx, dword [esp + 0x20]
mov edx, dword [eax + 0x58]
mov ebx, dword [edx + ecx]
test ebx, ebx
je 0x50cdb1
mov eax, dword [ebx + 0x10]
cmp eax, 5
jle 0x50cda7
mov edx, dword [ebx + 0x2c]
cmp edx, 0xffffffff
je 0x50cda7
mov eax, dword [ebp + 0x334]
mov ecx, dword [esp + 0x20]
cmp edx, 1
sbb edx, edx
mov esi, dword [eax + 0x58]
and edx, 0xfffffff0
add edx, 0x34
mov eax, dword [esi + ecx]
mov dword [esp + 0x14], 1
test eax, eax
je 0x50cd57
lea esi, [eax + 0xc]
mov ecx, edx
shr ecx, 2
lea edi, [ebx + 0xc]
repe cmpsd dword [esi], dword es:[edi]
jne 0x50cd45
mov ecx, edx
and ecx, 3
repe cmpsb byte [esi], byte es:[edi]
je 0x50cd4f
mov eax, dword [eax]
test eax, eax
jne 0x50cd2f
jmp 0x50cd57
mov dword [esp + 0x14], 0
mov eax, dword [esp + 0x14]
test eax, eax
je 0x50cda7
mov eax, dword [ebx + 0x2c]
test eax, eax
jne 0x50cd98
xor eax, eax
mov ecx, dword [ebx + 0x1c]
and cl, 2
mov edx, dword [ebx + 0x18]
cmp cl, 2
mov ecx, dword [ebx + 0x14]
sete al
push eax
push edx
push ecx
mov eax, dword [ebx + 0xc]
push eax
mov edx, dword [ebx + 0x20]
push edx
mov ecx, dword [ebp + 0x180]
call fcn.0046b490
inc dword [0x7de26c]
jmp 0x50cda7
mov eax, dword [ebp + 0x180]
mov ecx, ebp
push eax
push ebx
call fcn.0050d100
mov ebx, dword [ebx]
test ebx, ebx
jne 0x50ccf0
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x10]
add eax, 4
inc ecx
mov edx, dword [ebp + 0x334]
mov dword [esp + 0x20], eax
mov dword [esp + 0x10], ecx
cmp dword [edx + 0x68], ecx
jg 0x50cbff
mov edx, dword [ebp + 0x8c]
mov esi, dword [ebp + 0x90]
add edx, dword [esp + 0x12c]
add esi, dword [esp + 0x130]
mov eax, dword [esp + 0x12c]
mov ecx, dword [ebp + 0x94]
add ecx, eax
mov edi, dword [esp + 0x130]
mov ebx, dword [ebp + 0x98]
mov dword [ebp + 0x8c], edx
add ebx, edi
mov eax, dword [ebp + 0x180]
mov dword [ebp + 0x90], esi
mov dword [ebp + 0x94], ecx
mov ecx, dword [ebp + 0x320]
mov dword [ebp + 0x98], ebx
mov ebx, dword [eax + 0x3c]
mov eax, dword [ebp + 0x20]
push ebx
lea edi, [ecx + 0x28]
push edi
push esi
push edx
push eax
call fcn.0052cda0
mov ecx, ebp
call fcn.0050d030
mov eax, dword [esp + 0x12c]
mov ecx, dword [ebp + 0x8c]
sub ecx, eax
mov edi, dword [esp + 0x130]
mov esi, dword [ebp + 0x90]
mov edx, dword [ebp + 0x94]
sub esi, edi
sub edx, eax
mov eax, dword [ebp + 0x98]
mov dword [ebp + 0x8c], ecx
sub eax, edi
mov ecx, dword [ebp + 0x180]
mov dword [ebp + 0x90], esi
mov dword [ebp + 0x94], edx
mov dword [ebp + 0x98], eax
mov eax, dword [ecx + 0x5c]
mov edx, dword [ecx + 0x64]
mov ebx, dword [ecx + 0x60]
push edx
push eax
push ebx
mov edx, dword [ecx + 0x58]
push edx
mov eax, dword [ecx + 0x40]
push eax
mov ecx, dword [ecx + 0x3c]
push ecx
mov edx, dword [ebp + 0x328]
push edx
call fcn.0054b720
add esp, 0x1c
mov edx, dword [ebp + 0x180]
mov ecx, dword [ebp + 0x20]
mov dword [ecx + 0xd0], edx
mov dword [esp + 0x10], 0x18
mov eax, dword [ebp + 0x334]
mov edx, dword [esp + 0x10]
mov ecx, dword [eax + 0x5c]
mov esi, dword [ecx + edx]
test esi, esi
je 0x50cfcb
mov eax, dword [esi + 0x2c]
test eax, eax
jne 0x50cfb4
mov ebx, dword [esi + 0x1c]
mov edi, 0
and ebx, 0xffc
je 0x50cf53
test bl, 4
je 0x50cf20
push edi
push 0xffff00ff
push edi
push 0xffffff
call fcn.0054b680
add esp, 0x10
test bl, 8
je 0x50cf4e
and ebx, 0xff0
shr ebx, 4
mov ecx, ebx
shl ecx, 0x10
or ecx, ebx
mov eax, ecx
shl eax, 8
push eax
push 0xff00ff
push ecx
push 0xff00ff00
call fcn.0054b680
add esp, 0x10
mov edi, 1
mov eax, dword [esi + 0x28]
push eax
call fcn.0054b760
add esp, 4
mov eax, dword [esi + 0x24]
push eax
call fcn.0054b7a0
add esp, 4
mov ecx, dword [esi + 0xc]
mov eax, dword [esi + 0x1c]
and eax, 3
mov edx, dword [ecx + 4]
push eax
mov ebx, dword [ecx]
push edx
mov eax, dword [ecx + 0x14]
push ebx
mov ecx, dword [ecx + 0x10]
push eax
mov edx, dword [esi + 0x18]
push ecx
mov eax, dword [esi + 0x14]
push edx
mov ecx, dword [esi + 0x20]
push eax
push ecx
call fcn.0054b9a0
add esp, 0x20
test edi, edi
je 0x50cfc0
push 0
push 0xff00ff00
push 0
push 0xff00ff
call fcn.0054b680
add esp, 0x10
jmp 0x50cfc0
mov eax, dword [ebp + 0x20]
mov ecx, ebp
push eax
push esi
call fcn.0050d290
mov esi, dword [esi + 4]
test esi, esi
jne 0x50ceec
mov eax, dword [esp + 0x10]
add eax, 4
mov dword [esp + 0x10], eax
cmp eax, 0xa0
jle 0x50ced4
push str.view::view_function_terrain
mov ecx, dword [ebp + 0x20]
call fcn.0052bf50
mov eax, dword [ebp + 0x20]
mov ecx, dword [eax + 0xcc]
mov dword [eax + 0xd0], ecx
mov eax, dword [ebp + 0x334]
mov edx, dword [ebp + 0x330]
mov dword [ebp + 0x330], eax
mov dword [ebp + 0x334], edx
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x114
ret 0x14