Function at 0x50b254
Capabilities:
Check for time delay via gettickcount

Disassembly:
push ebp
mov ebp, esp
mov ecx, 0x19
push 0
push 0
dec ecx
jne 0x50b25c
push ebx
push esi
push edi
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x50c2ee
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [0x531548]
cmp dword [eax], 0
jne 0x50b28e
xor edx, edx
mov eax, dword [ebp - 8]
call fcn.004855b0
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x18]
test eax, eax
je 0x50b2a4
mov edx, dword [ebp - 8]
mov si, 0xfff6
call fcn.00404294
mov eax, dword [0x531528]
cmp dword [eax], 0
jne 0x50b2e2
mov eax, dword [ebp - 8]
call fcn.004856f8
mov edx, 0x50c304
call fcn.00429d00
mov edx, dword [0x531574]
mov dword [edx], eax
mov eax, dword [ebp - 8]
call fcn.004856f8
mov edx, 0x50c304
call fcn.00429d1c
mov edx, dword [0x531528]
mov dword [edx], eax
mov eax, dword [0x531548]
cmp dword [eax], 0
je 0x50c2ae
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x18]
mov edx, dword [0x531348]
cmp eax, dword [edx]
jne 0x50c291
mov eax, dword [0x531518]
cmp byte [eax + 5], 0
je 0x50b47b
xor eax, eax
mov dword [ebp - 0x40], eax
mov eax, dword [0x531dd0]
mov eax, dword [eax]
mov eax, dword [eax + 8]
dec eax
test eax, eax
jl 0x50b47b
inc eax
mov dword [ebp - 0x44], eax
xor esi, esi
mov eax, dword [0x531dd0]
mov eax, dword [eax]
mov edx, esi
call fcn.0041f6dc
mov dword [ebp - 0x3c], eax
mov eax, dword [0x531b1c]
mov eax, dword [eax]
cmp eax, dword [ebp - 0x3c]
je 0x50b394
call fcn.00407464
mov edx, dword [ebp - 4]
sub eax, dword [edx + 0x14]
cmp eax, 0x157c
jbe 0x50b394
mov eax, dword [0x531518]
cmp byte [eax + 7], 0
je 0x50b394
lea eax, [ebp - 0x5c]
mov edx, dword [ebp - 0x3c]
add edx, 0x10
call fcn.0040507c
mov eax, dword [ebp - 0x5c]
call fcn.004c9e9c
test al, al
je 0x50b394
mov eax, dword [0x531348]
mov eax, dword [eax]
mov edx, dword [ebp - 0x3c]
call fcn.004b287c
mov eax, dword [0x531518]
cmp byte [eax + 6], 0
jne 0x50b3a9
mov eax, dword [0x5312cc]
cmp byte [eax], 0
je 0x50b3c7
lea eax, [ebp - 0x60]
mov edx, dword [ebp - 0x3c]
add edx, 0x10
call fcn.0040507c
mov eax, dword [ebp - 0x60]
call fcn.004c9e38
test al, al
jne 0x50b471
cmp dword [ebp - 0x40], 0
je 0x50b3db
mov eax, dword [ebp - 0x40]
mov ebx, dword [eax + 8]
mov eax, dword [ebp - 0x40]
mov edi, dword [eax + 0xc]
jmp 0x50b3e2
mov ebx, 0xf0caa6
xor edi, edi
mov eax, dword [ebp - 0x3c]
cmp dword [eax + 0x30], 0
jle 0x50b3fa
mov eax, dword [ebp - 0x3c]
mov al, byte [eax + 0x30]
xor edx, edx
call fcn.0050e418
mov ebx, eax
mov eax, dword [0x531548]
mov eax, dword [eax]
mov eax, dword [eax + 8]
mov edx, dword [ebp - 0x3c]
sub eax, dword [edx]
cdq
xor eax, edx
sub eax, edx
cmp eax, 9
jle 0x50b42d
mov eax, dword [0x531548]
mov eax, dword [eax]
mov eax, dword [eax + 0xc]
mov edx, dword [ebp - 0x3c]
sub eax, dword [edx + 4]
cdq
xor eax, edx
sub eax, edx
cmp eax, 7
jg 0x50b471
push ebx
push edi
lea eax, [ebp - 0x64]
mov edx, dword [ebp - 0x3c]
add edx, 0x10
call fcn.0040507c
mov eax, dword [ebp - 0x64]
push eax
push 0x3a98
mov eax, dword [ebp - 0x3c]
mov ecx, dword [eax + 0x38]
add ecx, 0x10
mov eax, dword [ebp - 0x3c]
sub ecx, dword [eax + 0x40]
mov eax, dword [ebp - 0x3c]
mov edx, dword [eax + 0x34]
add edx, 0x18
mov eax, dword [ebp - 0x3c]
sub edx, dword [eax + 0x3c]
mov ebx, dword [0x53124c]
mov ebx, dword [ebx]
mov eax, dword [ebp - 8]
call ebx
inc esi
dec dword [ebp - 0x44]
jne 0x50b331
mov eax, dword [0x531348]
mov eax, dword [eax]
mov eax, dword [eax + 0x5a868]
mov eax, dword [eax + 8]
dec eax
test eax, eax
jl 0x50bf9e
inc eax
mov dword [ebp - 0x44], eax
mov dword [ebp - 0xc], 0
mov eax, dword [0x531348]
mov eax, dword [eax]
mov eax, dword [eax + 0x5a868]
mov edx, dword [ebp - 0xc]
call fcn.0041f6dc
mov ebx, eax
mov eax, dword [0x531518]
cmp byte [eax + 0xc], 0
je 0x50b61b
cmp byte [ebx + 0x2c], 0
jne 0x50b61b
cmp dword [ebx + 4], 0x32
jle 0x50b61b
call fcn.00407464
mov edx, dword [0x5320a8]
sub eax, dword [edx]
cmp eax, 0x1770
jb 0x50b61b
mov eax, dword [0x531e94]
mov eax, dword [eax]
mov edx, dword [eax]
call dword [edx + 0x14]
dec eax
test eax, eax
jl 0x50b61b
inc eax
mov dword [ebp - 0x48], eax
xor esi, esi
lea eax, [ebp - 0x14]
mov edx, dword [ebx + 0x34]
call fcn.00404eb0
mov edx, dword [ebp - 0x14]
mov eax, 0x50c310
call fcn.0040541c
mov edi, eax
test edi, edi
je 0x50b53e
lea eax, [ebp - 0x14]
push eax
mov ecx, edi
dec ecx
mov edx, 1
mov eax, dword [ebx + 0x34]
call fcn.00405338
lea ecx, [ebp - 0x68]
mov eax, dword [0x531e94]
mov eax, dword [eax]
mov edx, esi
mov edi, dword [eax]
call dword [edi + 0xc]
mov edx, dword [ebp - 0x68]
mov eax, dword [ebp - 0x14]
call fcn.00405224
jne 0x50b5ee
push 0xffffff
lea eax, [ebp - 0x6c]
push eax
lea ecx, [ebp - 0x90]
mov eax, dword [0x531e94]
mov eax, dword [eax]
mov edx, esi
mov edi, dword [eax]
call dword [edi + 0xc]
mov eax, dword [ebp - 0x90]
mov dword [ebp - 0x8c], eax
mov byte [ebp - 0x88], 0xb
lea ecx, [ebp - 0x94]
mov edx, dword [ebx + 0xc]
mov eax, dword [ebx + 8]
call fcn.0050b118
mov eax, dword [ebp - 0x94]
mov dword [ebp - 0x84], eax
mov byte [ebp - 0x80], 0xb
mov eax, dword [ebx + 8]
mov dword [ebp - 0x7c], eax
mov byte [ebp - 0x78], 0
mov eax, dword [ebx + 0xc]
mov dword [ebp - 0x74], eax
mov byte [ebp - 0x70], 0
lea edx, [ebp - 0x8c]
mov ecx, 3
mov eax, 0x50c31c
call fcn.0040bc68
mov edx, dword [ebp - 0x6c]
mov eax, dword [0x53180c]
mov eax, dword [eax]
mov ecx, 0xff
call fcn.0050acfc
mov eax, dword [0x531348]
mov eax, dword [eax]
mov eax, dword [eax + 0x5a868]
mov eax, dword [eax + 8]
dec eax
cmp eax, dword [ebp - 0xc]
jg 0x50b611
call fcn.00407464
mov edx, dword [0x5320a8]
mov dword [edx], eax
inc esi
dec dword [ebp - 0x48]
jne 0x50b50c
cmp byte [ebx + 0x12], 0x32
jne 0x50b632
mov ax, word [ebx + 0x1a]
add eax, 0xffffffc9
sub ax, 0x17
jb 0x50b8ae
mov eax, dword [0x531518]
cmp byte [eax + 3], 0
je 0x50b7bf
cmp dword [ebx + 0x5a], 1
jbe 0x50b7bf
cmp byte [ebx + 0x2c], 0
jne 0x50b7bf
mov eax, dword [ebx + 0x52]
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x98]
call fcn.0040ae98
push dword [ebp - 0x98]
push 0x50c33c
mov eax, dword [ebx + 0x5a]
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x9c]
call fcn.0040ae98
push dword [ebp - 0x9c]
lea eax, [ebp - 0x1c]
mov edx, 3
call fcn.00405198
mov eax, dword [0x531518]
cmp byte [eax + 4], 0
je 0x50b70e
cmp byte [ebx + 0x12], 0
jne 0x50b70e
cmp dword [ebx + 0x2a4], 0
jne 0x50b70e
mov al, byte [ebx + 0x18]
sub al, 1
jb 0x50b6c0
je 0x50b6c6
dec al
je 0x50b6cc
jmp 0x50b6d0
mov byte [ebp - 0x2d], 0x5a
jmp 0x50b6d0
mov byte [ebp - 0x2d], 0x4d
jmp 0x50b6d0
mov byte [ebp - 0x2d], 0x44
push dword [ebp - 0x1c]
push 0x50c33c
lea eax, [ebp - 0xa0]
mov dl, byte [ebp - 0x2d]
call fcn.00405000
push dword [ebp - 0xa0]
lea edx, [ebp - 0xa4]
movzx eax, word [ebx + 0x3c]
call fcn.0040adac
push dword [ebp - 0xa4]
lea eax, [ebp - 0x1c]
mov edx, 4
call fcn.00405198
cmp byte [ebx + 0x16], 0
jne 0x50b769
mov eax, dword [0x531518]
mov al, byte [eax + 0x16b]
xor edx, edx
call fcn.0050e418
push eax
push 0
mov eax, dword [ebp - 0x1c]
push eax
push 0x3a98
mov eax, dword [ebp - 0x1c]
call fcn.004050d8
mov edx, dword [0x531574]
imul dword [edx]
sar eax, 1
jns 0x50b749
adc eax, 0
mov edx, dword [ebx + 0xc8]
sub edx, eax
mov esi, dword [0x53124c]
mov esi, dword [esi]
mov ecx, dword [ebx + 0xcc]
sub ecx, 0x14
mov eax, dword [ebp - 8]
call esi
jmp 0x50b7bf
mov eax, dword [0x531518]
mov al, byte [eax + 0x16b]
xor edx, edx
call fcn.0050e418
push eax
push 0
mov eax, dword [ebp - 0x1c]
push eax
push 0x3a98
mov eax, dword [ebp - 0x1c]
call fcn.004050d8
mov edx, dword [0x531574]
imul dword [edx]
sar eax, 1
jns 0x50b79e
adc eax, 0
mov edx, dword [ebx + 0xc8]
sub edx, eax
add edx, 5
mov esi, dword [0x53124c]
mov esi, dword [esi]
mov ecx, dword [ebx + 0xcc]
sub ecx, 0x2e
mov eax, dword [ebp - 8]
call esi
mov eax, dword [0x531518]
cmp byte [eax + 0xa], 0
je 0x50b8ae
cmp byte [ebx + 0x2c], 0
jne 0x50b8ae
mov al, byte [ebx + 0x12]
test al, al
je 0x50b7e7
sub al, 0x32
jne 0x50b8ae
mov eax, dword [0x531690]
cmp ebx, dword [eax]
je 0x50b8ae
mov eax, dword [0x531548]
mov eax, dword [eax]
mov eax, dword [eax + 8]
sub eax, dword [ebx + 8]
cdq
xor eax, edx
sub eax, edx
cmp eax, 0xa
jge 0x50b8ae
mov eax, dword [0x531548]
mov eax, dword [eax]
mov eax, dword [eax + 0xc]
sub eax, dword [ebx + 0xc]
cdq
xor eax, edx
sub eax, edx
cmp eax, 0xa
jge 0x50b8ae
mov eax, dword [0x531518]
cmp byte [eax + 0xb], 0
je 0x50b848
mov eax, dword [0x5315ec]
cmp byte [eax], 0
je 0x50b862
mov eax, dword [0x531548]
cmp ebx, dword [eax]
jne 0x50b862
push dword [ebx + 0x30]
push 0x50c348
push dword [ebx + 0x34]
lea eax, [ebp - 0x10]
mov edx, 3
call fcn.00405198
jmp 0x50b86d
lea eax, [ebp - 0x10]
mov edx, dword [ebx + 0x34]
call fcn.00404eb0
cmp byte [ebx + 0x12], 0x32
jne 0x50b88b
push dword [ebx + 0x30]
push 0x50c348
push dword [ebx + 0x34]
lea eax, [ebp - 0x10]
mov edx, 3
call fcn.00405198
mov eax, dword [ebx + 0x38]
push eax
push 0
mov eax, dword [ebp - 0x10]
push eax
push 0
mov ecx, dword [ebx + 0xcc]
add ecx, 0x1e
mov edx, dword [ebx + 0xc8]
mov eax, dword [ebp - 8]
call fcn.0050b038
cmp byte [ebx + 0x12], 0x32
jne 0x50b8c5
mov ax, word [ebx + 0x1a]
add eax, 0xffffffc9
sub ax, 0x17
jb 0x50bb14
mov eax, dword [0x531518]
cmp byte [eax + 2], 0
jne 0x50b8e6
cmp byte [ebx + 0x214], 0
jne 0x50b8e6
cmp byte [ebx + 0x215], 0
je 0x50bb14
cmp byte [ebx + 0x2c], 0
jne 0x50bb14
xor esi, esi
cmp byte [ebx + 0x215], 0
je 0x50b915
call fcn.00407464
sub eax, dword [ebx + 0x218]
cmp eax, dword [ebx + 0x21c]
jbe 0x50b915
mov byte [ebx + 0x215], 0
mov eax, dword [0x531f80]
mov eax, dword [eax]
xor edx, edx
call fcn.00498b1c
mov edi, eax
test edi, edi
je 0x50ba35
cmp byte [ebx + 0x16], 0
jne 0x50b9b7
lea edx, [ebp - 0xb4]
mov eax, edi
call fcn.00485718
lea eax, [ebp - 0xb4]
push eax
push edi
push 1
mov eax, edi
call fcn.00485910
sar eax, 1
jns 0x50b95c
adc eax, 0
mov edx, dword [ebx + 0xc8]
sub edx, eax
mov ecx, dword [ebx + 0xcc]
sub ecx, 7
mov eax, dword [ebp - 8]
call fcn.00484e94
lea edx, [ebp - 0xb4]
mov eax, edi
call fcn.00485718
lea eax, [ebp - 0xb4]
push eax
push edi
push 1
mov eax, edi
call fcn.00485910
sar eax, 1
jns 0x50b99a
adc eax, 0
mov edx, dword [ebx + 0xc8]
sub edx, eax
mov ecx, dword [ebx + 0xcc]
sub ecx, 7
sub ecx, esi
mov eax, dword [ebp - 8]
call fcn.00484e94
jmp 0x50ba35
lea edx, [ebp - 0xb4]
mov eax, edi
call fcn.00485718
lea eax, [ebp - 0xb4]
push eax
push edi
push 1
mov eax, edi
call fcn.00485910
sar eax, 1
jns 0x50b9dc
adc eax, 0
mov edx, dword [ebx + 0xc8]
sub edx, eax
mov ecx, dword [ebx + 0xcc]
sub ecx, 0x1d
mov eax, dword [ebp - 8]
call fcn.00484e94
lea edx, [ebp - 0xb4]
mov eax, edi
call fcn.00485718
lea eax, [ebp - 0xb4]
push eax
push edi
push 1
mov eax, edi
call fcn.00485910
sar eax, 1
jns 0x50ba1a
adc eax, 0
mov edx, dword [ebx + 0xc8]
sub edx, eax
mov ecx, dword [ebx + 0xcc]
sub ecx, 0x1d
sub ecx, esi
mov eax, dword [ebp - 8]
call fcn.00484e94
mov eax, dword [0x531f80]
mov eax, dword [eax]
mov edx, 1
call fcn.00498b1c
mov edi, eax
test edi, edi
je 0x50bb14
lea edx, [ebp - 0x58]
mov eax, edi
call fcn.00485718
cmp dword [ebx + 0x5a], 0
jbe 0x50baac
mov eax, dword [ebp - 0x50]
sub eax, dword [ebp - 0x58]
mov dword [ebp - 0xb8], eax
fild dword [ebp - 0xb8]
mov eax, dword [ebx + 0x5a]
mov dword [ebp - 0xc0], eax
xor eax, eax
mov dword [ebp - 0xbc], eax
fild qword [ebp - 0xc0]
fdivp st(1)
mov eax, dword [ebx + 0x52]
mov dword [ebp - 0xc8], eax
xor eax, eax
mov dword [ebp - 0xc4], eax
fild qword [ebp - 0xc8]
fmulp st(1)
call fcn.00403340
mov dword [ebp - 0x50], eax
cmp byte [ebx + 0x16], 0
jne 0x50bae4
lea eax, [ebp - 0x58]
push eax
push edi
push 1
mov eax, edi
call fcn.00485910
sar eax, 1
jns 0x50bac7
adc eax, 0
mov edx, dword [ebx + 0xc8]
sub edx, eax
mov ecx, dword [ebx + 0xcc]
sub ecx, 7
sub ecx, esi
mov eax, dword [ebp - 8]
call fcn.00484e94
jmp 0x50bb14
lea eax, [ebp - 0x58]
push eax
push edi
push 1
mov eax, edi
call fcn.00485910
sar eax, 1
jns 0x50baf9
adc eax, 0
mov edx, dword [ebx + 0xc8]
sub edx, eax
mov ecx, dword [ebx + 0xcc]
sub ecx, 0x1d
sub ecx, esi
mov eax, dword [ebp - 8]
call fcn.00484e94
cmp byte [ebx + 0x12], 0
jne 0x50bf92
cmp dword [ebx + 0x88], 0
jne 0x50bbb7
lea eax, [ebp - 0x1c]
call fcn.00404e18
cmp dword [ebx + 0x37c], 0
je 0x50bb4a
lea eax, [ebp - 0x1c]
mov edx, dword [ebx + 0x37c]
call fcn.00404eb0
cmp dword [ebp - 0x1c], 0
je 0x50bbb7
push 1
mov eax, dword [ebp - 8]
call fcn.004856f8
call fcn.00429ec4
push eax
call fcn.004077c4
push 0xffff00
mov eax, dword [ebx + 0xb0]
push eax
mov eax, dword [ebp - 0x1c]
push eax
push 0x3a98
mov eax, dword [ebp - 8]
call fcn.004856f8
mov edx, dword [ebp - 0x1c]
call fcn.00429d00
sar eax, 1
jns 0x50bb91
adc eax, 0
mov edx, dword [ebx + 0xc8]
sub edx, eax
mov ecx, dword [ebx + 0xcc]
sub ecx, 0x26
mov eax, dword [ebp - 8]
call fcn.004cea18
mov eax, dword [ebp - 8]
call fcn.004856f8
call fcn.00484534
cmp byte [ebx + 0x2b4], 0
jbe 0x50bd34
cmp word [ebx + 0x2b2], 0xffff
je 0x50bd34
call fcn.00407464
sub eax, dword [ebx + 0x2b8]
cmp eax, 0xb4
jbe 0x50bc0b
inc byte [ebx + 0x2bc]
cmp byte [ebx + 0x2bc], 8
jb 0x50bc00
mov byte [ebx + 0x2bc], 0
dec byte [ebx + 0x2b4]
call fcn.00407464
mov dword [ebx + 0x2b8], eax
xor esi, esi
cmp byte [ebx + 0x2b4], 0
jbe 0x50bc3c
movsx eax, word [ebx + 0x2b2]
mov edx, eax
add edx, edx
lea edx, [edx + edx*4]
xor eax, eax
mov al, byte [ebx + 0x2bc]
add edx, eax
mov eax, dword [0x531c98]
mov eax, dword [eax]
call fcn.00498b1c
mov esi, eax
test esi, esi
je 0x50bf92
cmp byte [ebx + 0x16], 0
jne 0x50bcbf
cmp byte [ebx + 0x2d0], 0
jne 0x50bc89
lea edx, [ebp - 0xb4]
mov eax, esi
call fcn.00485718
lea eax, [ebp - 0xb4]
push eax
push esi
push 1
mov ecx, dword [ebx + 0xcc]
sub ecx, 0x27
mov edx, dword [ebx + 0xc8]
sub edx, 9
mov eax, dword [ebp - 8]
call fcn.00484e94
jmp 0x50bf92
lea edx, [ebp - 0xb4]
mov eax, esi
call fcn.00485718
lea eax, [ebp - 0xb4]
push eax
push esi
push 1
mov ecx, dword [ebx + 0xcc]
sub ecx, 0x45
mov edx, dword [ebx + 0xc8]
sub edx, 0x17
mov eax, dword [ebp - 8]
call fcn.00484e94
jmp 0x50bf92
cmp byte [ebx + 0x2d0], 0
jne 0x50bcfe
lea edx, [ebp - 0xb4]
mov eax, esi
call fcn.00485718
lea eax, [ebp - 0xb4]
push eax
push esi
push 1
mov ecx, dword [ebx + 0xcc]
sub ecx, 0x3a
mov edx, dword [ebx + 0xc8]
sub edx, 9
mov eax, dword [ebp - 8]
call fcn.00484e94
jmp 0x50bf92
lea edx, [ebp - 0xb4]
mov eax, esi
call fcn.00485718
lea eax, [ebp - 0xb4]
push eax
push esi
push 1
mov ecx, dword [ebx + 0xcc]
sub ecx, 0x58
mov edx, dword [ebx + 0xc8]
sub edx, 0x17
mov eax, dword [ebp - 8]
call fcn.00484e94
jmp 0x50bf92
mov edi, ebx
cmp byte [edi + 0x375], 0
je 0x50be1b
mov eax, dword [0x5320fc]
mov eax, dword [eax]
mov edx, 0x41
call fcn.00498b1c
mov esi, eax
test esi, esi
je 0x50bf92
lea eax, [ebp - 0x1c]
call fcn.00404e18
cmp dword [edi + 0x378], 0
je 0x50bd7d
lea eax, [ebp - 0x1c]
mov edx, dword [ebx + 0x378]
call fcn.00404eb0
cmp dword [ebp - 0x1c], 0
je 0x50bde5
push 1
mov eax, dword [ebp - 8]
call fcn.004856f8
call fcn.00429ec4
push eax
call fcn.004077c4
push 0xffffff
push 0
mov eax, dword [ebp - 0x1c]
push eax
push 0x3a98
mov eax, dword [ebp - 8]
call fcn.004856f8
mov edx, dword [ebp - 0x1c]
call fcn.00429d00
sar eax, 1
jns 0x50bdbf
adc eax, 0
mov edx, dword [ebx + 0xc8]
sub edx, eax
mov ecx, dword [ebx + 0xcc]
sub ecx, 0x26
mov eax, dword [ebp - 8]
call fcn.004cea18
mov eax, dword [ebp - 8]
call fcn.004856f8
call fcn.00484534
lea edx, [ebp - 0xb4]
mov eax, esi
call fcn.00485718
lea eax, [ebp - 0xb4]
push eax
push esi
push 1
mov ecx, dword [ebx + 0xcc]
sub ecx, 0x19
mov edx, dword [ebx + 0xc8]
sub edx, 0x21
mov eax, dword [ebp - 8]
call fcn.00484e94
jmp 0x50bf92
xor edi, edi
mov eax, dword [ebx + 0x178]
cmp eax, 0xfffe
jl 0x50bec3
mov edx, 0xffff
sub edx, eax
add edx, 0x127
mov eax, dword [0x531f80]
mov eax, dword [eax]
call fcn.00498b1c
mov esi, eax
test esi, esi
je 0x50bf92
cmp byte [ebx + 0x16], 0
jne 0x50be8d
lea edx, [ebp - 0xb4]
mov eax, esi
call fcn.00485718
lea eax, [ebp - 0xb4]
push eax
push esi
push 1
mov ecx, dword [ebx + 0xcc]
sub ecx, 0x24
mov edx, dword [ebx + 0xc8]
sub edx, 0x16
mov eax, dword [ebp - 8]
call fcn.00484e94
jmp 0x50bf92
lea edx, [ebp - 0xb4]
mov eax, esi
call fcn.00485718
lea eax, [ebp - 0xb4]
push eax
push esi
push 1
mov ecx, dword [ebx + 0xcc]
sub ecx, 0x34
mov edx, dword [ebx + 0xc8]
sub edx, 0x16
mov eax, dword [ebp - 8]
call fcn.00484e94
jmp 0x50bf92
test eax, eax
je 0x50bec8
inc edi
cmp dword [ebx + 0x184], 0
je 0x50bed2
inc edi
cmp dword [ebx + 0x190], 0
je 0x50bedc
inc edi
cmp dword [ebx + 0x19c], 0
je 0x50bee6
inc edi
mov eax, dword [ebx + 0xc8]
sub eax, 8
mov dword [ebp - 0x24], eax
lea eax, [edi + edi*4]
sub dword [ebp - 0x24], eax
cmp byte [ebx + 0x16], 0
jne 0x50bf49
xor esi, esi
mov edi, dword [ebx + esi*4 + 0x1a8]
test edi, edi
je 0x50bf41
lea edx, [ebp - 0xb4]
mov eax, edi
call fcn.00485718
lea eax, [ebp - 0xb4]
push eax
mov eax, dword [ebx + esi*4 + 0x1a8]
push eax
push 1
mov ecx, dword [ebx + 0xcc]
sub ecx, 0x24
mov edx, dword [ebp - 0x24]
mov eax, dword [ebp - 8]
call fcn.00484e94
add dword [ebp - 0x24], 0x10
inc esi
cmp esi, 4
jne 0x50bf00
jmp 0x50bf92
xor esi, esi
mov edi, dword [ebx + esi*4 + 0x1a8]
test edi, edi
je 0x50bf8c
lea edx, [ebp - 0xb4]
mov eax, edi
call fcn.00485718
lea eax, [ebp - 0xb4]
push eax
mov eax, dword [ebx + esi*4 + 0x1a8]
push eax
push 1
mov ecx, dword [ebx + 0xcc]
sub ecx, 0x34
mov edx, dword [ebp - 0x24]
mov eax, dword [ebp - 8]
call fcn.00484e94
add dword [ebp - 0x24], 0x10
inc esi
cmp esi, 4
jne 0x50bf4b
inc dword [ebp - 0xc]
dec dword [ebp - 0x44]
jne 0x50b49f
mov eax, dword [0x531690]
cmp dword [eax], 0
je 0x50c01e
mov edx, dword [0x531690]
mov edx, dword [edx]
mov eax, dword [0x531348]
mov eax, dword [eax]
call fcn.004b7258
test al, al
je 0x50c01e
mov eax, dword [0x531690]
mov eax, dword [eax]
push dword [eax + 0x30]
push 0x50c348
mov eax, dword [0x531690]
mov eax, dword [eax]
push dword [eax + 0x34]
lea eax, [ebp - 0x10]
mov edx, 3
call fcn.00405198
mov eax, dword [0x531690]
mov eax, dword [eax]
mov eax, dword [eax + 0x38]
push eax
push 0
mov eax, dword [ebp - 0x10]
push eax
push 0
mov eax, dword [0x531690]
mov eax, dword [eax]
mov ecx, dword [eax + 0xcc]
add ecx, 0x1e
mov eax, dword [0x531690]
mov eax, dword [eax]
mov edx, dword [eax + 0xc8]
mov eax, dword [ebp - 8]
call fcn.0050b038
mov eax, dword [0x5315ec]
cmp byte [eax], 0
je 0x50c086
mov eax, dword [0x531548]
mov eax, dword [eax]
push dword [eax + 0x30]
push 0x50c348
mov eax, dword [0x531548]
mov eax, dword [eax]
push dword [eax + 0x34]
lea eax, [ebp - 0x10]
mov edx, 3
call fcn.00405198
mov eax, dword [0x531548]
mov eax, dword [eax]
mov eax, dword [eax + 0x38]
push eax
push 0
mov eax, dword [ebp - 0x10]
push eax
push 1
mov eax, dword [0x531548]
mov eax, dword [eax]
mov ecx, dword [eax + 0xcc]
add ecx, 0x1e
mov eax, dword [0x531548]
mov eax, dword [eax]
mov edx, dword [eax + 0xc8]
mov eax, dword [ebp - 8]
call fcn.0050b038
mov eax, dword [ebp - 8]
call fcn.004856f8
mov eax, dword [eax + 0xc]
mov edx, 0xffffff
call fcn.00428de0
mov eax, dword [0x531348]
mov eax, dword [eax]
mov eax, dword [eax + 0x5a868]
mov eax, dword [eax + 8]
dec eax
test eax, eax
jl 0x50c1ed
inc eax
mov dword [ebp - 0x44], eax
mov dword [ebp - 0xc], 0
mov eax, dword [0x531348]
mov eax, dword [eax]
mov eax, dword [eax + 0x5a868]
mov edx, dword [ebp - 0xc]
call fcn.0041f6dc
mov ebx, eax
cmp dword [ebx + 0x88], 0
je 0x50c1e1
call fcn.00407464
sub eax, dword [ebx + 0xc4]
cmp eax, 0xfa0
jae 0x50c1ce
mov eax, dword [ebx + 0xd0]
dec eax
test eax, eax
jl 0x50c1e1
inc eax
mov dword [ebp - 0x48], eax
xor esi, esi
cmp byte [ebx + 0x2c], 0
je 0x50c169
push 0x808080
mov eax, dword [ebx + esi*4 + 0xb0]
push eax
mov eax, dword [ebx + esi*4 + 0x88]
push eax
push 0x3a98
mov eax, dword [ebx + 0xd0]
shl eax, 4
mov ecx, dword [ebx + 0xcc]
sub ecx, eax
imul eax, esi, 0xe
add ecx, eax
mov eax, dword [ebx + esi*4 + 0x9c]
sar eax, 1
jns 0x50c152
adc eax, 0
mov edx, dword [ebx + 0xc8]
sub edx, eax
mov edi, dword [0x53124c]
mov edi, dword [edi]
mov eax, dword [ebp - 8]
call edi
jmp 0x50c1c2
push 0xffffff
mov edx, dword [ebx + esi*4 + 0xb0]
push edx
mov edx, dword [ebx + esi*4 + 0x88]
push edx
push 0x3a98
mov eax, dword [ebx + 0xd0]
imul edx, eax, 0x1e
dec eax
imul eax, eax, 0xe
sub edx, eax
mov ecx, dword [ebx + 0xcc]
sub ecx, edx
imul eax, esi, 0xe
add ecx, eax
mov eax, dword [ebx + esi*4 + 0x9c]
sar eax, 1
jns 0x50c1ad
adc eax, 0
mov edx, dword [ebx + 0xc8]
sub edx, eax
mov edi, dword [0x53124c]
mov edi, dword [edi]
mov eax, dword [ebp - 8]
call edi
inc esi
dec dword [ebp - 0x48]
jne 0x50c10e
jmp 0x50c1e1
lea eax, [ebx + 0x88]
call fcn.00404e18
xor eax, eax
mov dword [ebx + 0xb0], eax
inc dword [ebp - 0xc]
dec dword [ebp - 0x44]
jne 0x50c0bf
mov eax, dword [0x5320a4]
test byte [eax], 4
je 0x50c219
push 0xffffff
push 0
push 0x50c354
push 0x3a98
mov ebx, dword [0x53124c]
mov ebx, dword [ebx]
xor ecx, ecx
xor edx, edx
mov eax, dword [ebp - 8]
call ebx
mov eax, dword [ebp - 8]
call fcn.004856f8
call fcn.00484534
xor eax, eax
mov dword [ebp - 0xc], eax
xor esi, esi
mov ecx, esi
mov eax, 1
shr eax, cl
mov edx, dword [0x5320a4]
and eax, dword [edx]
je 0x50c28b
lea edx, [esi + 0x96]
mov eax, dword [0x531838]
mov eax, dword [eax]
call fcn.00498b1c
mov edi, eax
test edi, edi
je 0x50c28b
mov eax, edi
call fcn.00485910
add dword [ebp - 0xc], eax
lea edx, [ebp - 0xb4]
mov eax, edi
call fcn.00485718
lea eax, [ebp - 0xb4]
push eax
push edi
push 1
mov edx, 0x320
sub edx, dword [ebp - 0xc]
xor ecx, ecx
mov eax, dword [ebp - 8]
call fcn.00484e94
inc esi
cmp esi, 0x10
jne 0x50c22d
call fcn.00407464
mov edx, dword [ebp - 4]
sub eax, dword [edx + 0x14]
cmp eax, 0x157c
jbe 0x50c2ae
call fcn.00407464
mov edx, dword [ebp - 4]
mov dword [edx + 0x14], eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x50c2f5
lea eax, [ebp - 0xa4]
mov edx, 6
call fcn.00404e3c
lea eax, [ebp - 0x6c]
mov edx, 5
call fcn.00404e3c
lea eax, [ebp - 0x1c]
call fcn.00404e18
lea eax, [ebp - 0x14]
mov edx, 2
call fcn.00404e3c
ret