Function at 0x500258
Capabilities:
Access peb ldr_data
Check os version

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffc4
push ebx
push esi
push edi
xor edx, edx
mov dword [ebp - 0x34], edx
mov dword [ebp - 0x38], edx
mov dword [ebp - 0x3c], edx
mov dword [ebp - 0x30], edx
mov dword [ebp - 0x24], edx
mov dword [ebp - 0x28], edx
mov dword [ebp - 4], eax
lea esi, [ebp - 4]
xor eax, eax
push ebp
push 0x501068
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [esi]
cmp dword [eax + 0xcc], 0
setne byte [ebp - 0xb]
mov eax, dword [esi]
mov edx, dword [esi]
mov ecx, dword [edx + 8]
mov dword [eax + 0x10], ecx
mov ecx, dword [edx + 0xc]
mov dword [eax + 0x14], ecx
mov eax, dword [esi]
mov eax, dword [eax + 0x8c]
cdq
mov ecx, dword [esi]
add eax, dword [ecx + 0x98]
adc edx, dword [ecx + 0x9c]
mov ecx, dword [esi]
mov dword [ecx + 8], eax
mov dword [ecx + 0xc], edx
mov eax, dword [esi]
mov edx, dword [esi]
mov ecx, dword [edx + 0x20]
mov dword [eax + 0x28], ecx
mov ecx, dword [edx + 0x24]
mov dword [eax + 0x2c], ecx
mov eax, dword [esi]
mov eax, dword [eax + 0x30]
cdq
mov ecx, dword [esi]
add eax, dword [ecx + 0x98]
adc edx, dword [ecx + 0x9c]
mov ecx, dword [esi]
mov dword [ecx + 0x38], eax
mov dword [ecx + 0x3c], edx
mov eax, dword [esi]
mov dword [eax + 0x4c], 0xffffffff
mov eax, dword [esi]
mov dword [eax + 0x50], 0xffffffff
mov eax, dword [esi]
xor edx, edx
mov dword [eax + 0x54], edx
mov eax, dword [esi]
mov eax, dword [eax + 0x8c]
mov edx, dword [esi]
cmp eax, dword [edx + 0x88]
jle 0x500325
xor edi, edi
jmp 0x501040
mov edx, dword [esi]
cmp dword [edx + 0x60], 0
jne 0x500338
mov edx, dword [esi]
mov edx, dword [edx + 0x74]
mov bl, byte [edx + eax - 1]
jmp 0x50034a
mov edx, eax
mov eax, dword [esi]
call fcn.005019b4
mov ebx, eax
mov eax, dword [esi]
call fcn.005019f8
mov eax, dword [esi]
mov dword [eax + 0x50], 0xffffffff
mov eax, dword [esi]
xor edx, edx
mov dword [eax + 0x54], edx
mov eax, dword [esi]
mov eax, dword [eax + 0x8c]
mov edx, dword [esi]
mov dword [edx + 0x4c], eax
mov eax, ebx
sub al, 9
je 0x500424
dec al
je 0x5003ef
sub al, 3
je 0x50039c
sub al, 0x13
jne 0x500442
mov eax, dword [esi]
inc dword [eax + 0x8c]
mov eax, dword [esi]
mov edx, dword [eax + 0x8c]
mov eax, dword [esi]
call fcn.005019b4
mov ebx, eax
jmp 0x500367
mov eax, dword [esi]
inc dword [eax + 0x8c]
mov eax, dword [esi]
mov edx, dword [eax + 0x8c]
mov eax, dword [esi]
call fcn.005019b4
mov ebx, eax
cmp bl, 0xa
jne 0x5003d3
mov eax, dword [esi]
inc dword [eax + 0x8c]
mov eax, dword [esi]
mov edx, dword [eax + 0x8c]
mov eax, dword [esi]
call fcn.005019b4
mov ebx, eax
mov eax, dword [esi]
add dword [eax + 0x20], 1
adc dword [eax + 0x24], 0
mov eax, dword [esi]
mov eax, dword [eax + 0x8c]
mov edx, dword [esi]
mov dword [edx + 0x30], eax
jmp 0x500367
mov eax, dword [esi]
inc dword [eax + 0x8c]
mov eax, dword [esi]
mov edx, dword [eax + 0x8c]
mov eax, dword [esi]
call fcn.005019b4
mov ebx, eax
mov eax, dword [esi]
add dword [eax + 0x20], 1
adc dword [eax + 0x24], 0
mov eax, dword [esi]
mov eax, dword [eax + 0x8c]
mov edx, dword [esi]
mov dword [edx + 0x30], eax
jmp 0x500367
mov eax, dword [esi]
inc dword [eax + 0x8c]
mov eax, dword [esi]
mov edx, dword [eax + 0x8c]
mov eax, dword [esi]
call fcn.005019b4
mov ebx, eax
jmp 0x500367
mov eax, dword [esi]
mov eax, dword [eax + 0x4c]
mov edx, dword [esi]
mov edx, dword [edx + 0x8c]
cmp eax, edx
jge 0x500462
mov ecx, edx
sub ecx, eax
mov edx, eax
mov eax, dword [esi]
call fcn.00501aac
jmp 0x50046b
mov eax, dword [esi]
mov dword [eax + 0x4c], 0xffffffff
mov eax, dword [esi]
cmp byte [eax + 0x18], 0
jne 0x500485
mov eax, dword [esi]
cmp dword [eax + 0x54], 0
je 0x500485
mov edi, 0xffffff95
jmp 0x501040
mov eax, dword [esi]
mov eax, dword [eax + 0x8c]
mov edx, dword [esi]
cmp eax, dword [edx + 0x88]
jle 0x50049e
xor edi, edi
jmp 0x501040
mov eax, dword [esi]
mov dword [eax + 0x50], 0xffffffff
mov eax, dword [esi]
xor edx, edx
mov dword [eax + 0x54], edx
mov byte [ebp - 9], 0
mov eax, dword [esi]
cmp byte [eax + 0x1a], 0
jne 0x50052f
mov eax, dword [esi]
mov ecx, dword [eax + 0x8c]
mov edx, ebx
mov eax, dword [esi]
mov edi, dword [eax]
call dword [edi + 0x24]
test al, al
je 0x50052f
mov byte [ebp - 9], 1
mov eax, dword [esi]
mov eax, dword [eax + 0x8c]
mov edx, dword [esi]
mov dword [edx + 0x4c], eax
jmp 0x5004fb
mov eax, dword [esi]
inc dword [eax + 0x8c]
mov eax, dword [esi]
mov edx, dword [eax + 0x8c]
mov eax, dword [esi]
call fcn.005019b4
mov ebx, eax
mov eax, dword [esi]
mov eax, dword [eax + 0x8c]
mov edx, dword [esi]
cmp eax, dword [edx + 0x88]
jg 0x500517
cmp bl, 0xd
je 0x500517
cmp bl, 0xa
jne 0x5004e2
mov edx, dword [esi]
mov ecx, dword [edx + 0x8c]
mov eax, dword [esi]
mov eax, dword [eax + 0x4c]
sub ecx, eax
mov edx, eax
mov eax, dword [esi]
call fcn.00501aac
push ebp
mov eax, ebx
call fcn.005001d4
pop ecx
test al, al
je 0x500682
mov byte [ebp - 9], 1
mov eax, dword [esi]
mov eax, dword [eax + 0x8c]
mov edx, dword [esi]
cmp eax, dword [edx + 0x88]
jg 0x500682
mov edx, dword [esi]
mov dword [edx + 0x4c], eax
jmp 0x500654
mov eax, ebx
sub al, 0xa
je 0x5005c5
sub al, 3
jne 0x5005f7
mov eax, dword [esi]
inc dword [eax + 0x8c]
mov eax, dword [esi]
mov edx, dword [eax + 0x8c]
mov eax, dword [esi]
call fcn.005019b4
mov ebx, eax
cmp bl, 0xa
jne 0x5005a9
mov eax, dword [esi]
inc dword [eax + 0x8c]
mov eax, dword [esi]
mov edx, dword [eax + 0x8c]
mov eax, dword [esi]
call fcn.005019b4
mov ebx, eax
mov eax, dword [esi]
add dword [eax + 0x20], 1
adc dword [eax + 0x24], 0
mov eax, dword [esi]
mov eax, dword [eax + 0x8c]
mov edx, dword [esi]
mov dword [edx + 0x30], eax
jmp 0x500654
mov eax, dword [esi]
inc dword [eax + 0x8c]
mov eax, dword [esi]
mov edx, dword [eax + 0x8c]
mov eax, dword [esi]
call fcn.005019b4
mov ebx, eax
mov eax, dword [esi]
add dword [eax + 0x20], 1
adc dword [eax + 0x24], 0
mov eax, dword [esi]
mov eax, dword [eax + 0x8c]
mov edx, dword [esi]
mov dword [edx + 0x30], eax
jmp 0x500654
xor edi, edi
mov eax, dword [esi]
mov eax, dword [eax + 0x48]
call fcn.00404d58
mov dword [ebp - 8], eax
jmp 0x500609
inc edi
cmp edi, dword [ebp - 8]
jge 0x500629
mov eax, dword [esi]
mov edx, dword [eax + 0x8c]
add edx, edi
mov eax, dword [esi]
call fcn.005019b4
mov edx, dword [esi]
mov edx, dword [edx + 0x48]
cmp al, byte [edx + edi]
je 0x500608
cmp edi, dword [ebp - 8]
jne 0x50063b
mov eax, dword [esi]
mov edx, dword [ebp - 8]
add dword [eax + 0x8c], edx
jmp 0x50066a
mov eax, dword [esi]
inc dword [eax + 0x8c]
mov eax, dword [esi]
mov edx, dword [eax + 0x8c]
mov eax, dword [esi]
call fcn.005019b4
mov ebx, eax
mov eax, dword [esi]
mov eax, dword [eax + 0x8c]
mov edx, dword [esi]
cmp eax, dword [edx + 0x88]
jle 0x500564
mov edx, dword [esi]
mov ecx, dword [edx + 0x8c]
mov eax, dword [esi]
mov eax, dword [eax + 0x4c]
sub ecx, eax
mov edx, eax
mov eax, dword [esi]
call fcn.00501aac
mov eax, dword [esi]
mov al, byte [eax + 0x19]
xor al, 1
and al, byte [ebp - 9]
je 0x500698
mov edi, 0xffffff94
jmp 0x501040
cmp byte [ebp - 9], 0
jne 0x50030a
mov eax, dword [esi]
mov dword [eax + 0x50], 0xffffffff
mov eax, dword [esi]
xor edx, edx
mov dword [eax + 0x54], edx
mov edx, ebx
mov eax, dword [esi]
mov ecx, dword [eax]
call dword [ecx + 8]
test al, al
jne 0x5006c8
cmp bl, 0x5f
jne 0x5008e4
mov edi, 0xffffff99
mov eax, dword [esi]
mov eax, dword [eax + 0x8c]
mov edx, dword [esi]
mov dword [edx + 0x4c], eax
mov byte [ebp - 0x1d], bl
cmp byte [ebp - 0xb], 0
je 0x500738
mov edx, 0x501078
mov eax, ebx
call fcn.004fd4e4
test al, al
je 0x5006f6
sub bl, 0x20
mov eax, dword [esi]
mov eax, dword [eax + 0xcc]
call fcn.00404d58
mov edx, dword [esi]
mov edx, dword [edx + 0x8c]
mov ecx, dword [esi]
sub edx, dword [ecx + 0x4c]
inc edx
cmp eax, edx
jl 0x50072f
mov eax, dword [esi]
mov eax, dword [eax + 0x8c]
mov edx, dword [esi]
sub eax, dword [edx + 0x4c]
mov edx, dword [esi]
mov edx, dword [edx + 0xcc]
cmp bl, byte [edx + eax]
je 0x500733
xor eax, eax
jmp 0x500735
mov al, 1
mov byte [ebp - 0xb], al
mov eax, dword [esi]
inc dword [eax + 0x8c]
mov eax, dword [esi]
mov edx, dword [eax + 0x8c]
mov eax, dword [esi]
call fcn.005019b4
mov ebx, eax
mov edx, ebx
mov eax, dword [esi]
mov ecx, dword [eax]
call dword [ecx + 8]
test al, al
jne 0x5006dd
mov edx, ebx
mov eax, dword [esi]
mov ecx, dword [eax]
call dword [ecx + 0xc]
test al, al
jne 0x5006dd
cmp bl, 0x5f
je 0x5006dd
mov eax, dword [esi]
cmp byte [eax + 0x84], 0
je 0x5008bc
mov eax, dword [esi]
mov eax, dword [eax + 0x8c]
mov edx, dword [esi]
sub eax, dword [edx + 0x4c]
dec eax
jne 0x5008bc
cmp byte [ebp - 0x1d], 0x71
je 0x5007af
cmp byte [ebp - 0x1d], 0x51
jne 0x5008bc
mov edx, ebx
mov eax, dword [esi]
mov ecx, dword [eax]
call dword [ecx + 0x10]
test al, al
je 0x5008bc
mov edi, 0xffffff96
mov byte [ebp - 0xa], bl
mov eax, dword [esi]
inc dword [eax + 0x8c]
mov eax, dword [esi]
mov eax, dword [eax + 0x8c]
mov edx, dword [esi]
cmp eax, dword [edx + 0x88]
jg 0x50085e
mov edx, eax
mov eax, dword [esi]
call fcn.005019b4
mov byte [ebp - 0x1d], al
mov al, byte [ebp - 0x1d]
sub al, 0x28
je 0x500815
sub al, 0x14
je 0x50080f
sub al, 0x1f
je 0x500803
sub al, 0x20
je 0x500809
jmp 0x500819
mov byte [ebp - 0x1d], 0x5d
jmp 0x500819
mov byte [ebp - 0x1d], 0x7d
jmp 0x500819
mov byte [ebp - 0x1d], 0x3e
jmp 0x500819
mov byte [ebp - 0x1d], 0x29
mov byte [ebp - 0x1e], 0
mov eax, dword [esi]
inc dword [eax + 0x8c]
jmp 0x50084c
mov edx, eax
mov eax, dword [esi]
call fcn.005019b4
mov ebx, eax
mov eax, dword [esi]
inc dword [eax + 0x8c]
cmp byte [ebp - 0x1e], 0
je 0x500845
cmp bl, byte [ebp - 0xa]
je 0x50085e
cmp bl, byte [ebp - 0x1d]
sete byte [ebp - 0x1e]
mov eax, dword [esi]
mov eax, dword [eax + 0x8c]
mov edx, dword [esi]
cmp eax, dword [edx + 0x88]
jle 0x500827
mov eax, dword [esi]
cmp byte [eax + 0x40], 0
je 0x500883
mov edx, dword [esi]
mov ecx, dword [edx + 0x8c]
mov eax, dword [esi]
mov eax, dword [eax + 0x4c]
sub ecx, eax
mov edx, eax
mov eax, dword [esi]
call fcn.00501aac
jmp 0x501024
mov edx, dword [esi]
mov edx, dword [edx + 0x8c]
mov eax, dword [esi]
mov eax, dword [eax + 0x4c]
sub edx, eax
cmp edx, 5
jle 0x501024
mov edx, dword [esi]
mov ecx, dword [edx + 0x8c]
mov edx, dword [esi]
sub ecx, dword [edx + 0x4c]
sub ecx, 5
mov edx, eax
add edx, 3
mov eax, dword [esi]
call fcn.00501aac
jmp 0x501024
mov eax, dword [esi]
mov dl, byte [ebp - 0xb]
mov byte [eax + 0xd0], dl
mov edx, dword [esi]
mov ecx, dword [edx + 0x8c]
mov eax, dword [esi]
mov eax, dword [eax + 0x4c]
sub ecx, eax
mov edx, eax
mov eax, dword [esi]
call fcn.00501aac
jmp 0x501024
mov edx, ebx
mov eax, dword [esi]
mov ecx, dword [eax]
call dword [ecx + 0xc]
test al, al
je 0x500a45
mov edi, 0xffffff97
mov eax, dword [esi]
mov eax, dword [eax + 0x8c]
mov dword [ebp - 0x1c], eax
mov edx, dword [esi]
mov dword [edx + 0x4c], eax
cmp byte [ebp - 0xb], 0
je 0x50094e
mov eax, dword [esi]
mov eax, dword [eax + 0xcc]
call fcn.00404d58
mov edx, dword [esi]
mov edx, dword [edx + 0x8c]
sub edx, dword [ebp - 0x1c]
inc edx
cmp eax, edx
jl 0x500945
mov eax, dword [esi]
mov eax, dword [eax + 0x8c]
sub eax, dword [ebp - 0x1c]
mov edx, dword [esi]
mov edx, dword [edx + 0xcc]
cmp bl, byte [edx + eax]
je 0x500949
xor eax, eax
jmp 0x50094b
mov al, 1
mov byte [ebp - 0xb], al
mov eax, dword [esi]
inc dword [eax + 0x8c]
mov eax, dword [esi]
mov edx, dword [eax + 0x8c]
mov eax, dword [esi]
call fcn.005019b4
mov ebx, eax
mov edx, ebx
mov eax, dword [esi]
mov ecx, dword [eax]
call dword [ecx + 0xc]
test al, al
jne 0x50090a
mov edx, dword [esi]
mov ecx, dword [edx + 0x8c]
mov eax, dword [esi]
mov eax, dword [eax + 0x4c]
sub ecx, eax
mov edx, eax
mov eax, dword [esi]
call fcn.00501aac
mov eax, dword [esi]
mov dl, byte [ebp - 0xb]
mov byte [eax + 0xd0], dl
mov eax, dword [esi]
cmp bl, byte [eax + 0x42]
jne 0x501024
mov eax, dword [esi]
mov eax, dword [eax + 0x8c]
inc eax
mov edx, dword [esi]
cmp eax, dword [edx + 0x88]
jg 0x501024
mov eax, dword [esi]
mov edx, dword [eax + 0x8c]
inc edx
mov eax, dword [esi]
call fcn.005019b4
mov edx, eax
mov eax, dword [esi]
mov ecx, dword [eax]
call dword [ecx + 0xc]
test al, al
je 0x501024
mov eax, dword [esi]
mov eax, dword [eax + 0x8c]
mov edx, dword [esi]
mov dword [edx + 0x4c], eax
mov eax, dword [esi]
inc dword [eax + 0x8c]
mov eax, dword [esi]
mov edx, dword [eax + 0x8c]
mov eax, dword [esi]
call fcn.005019b4
mov ebx, eax
jmp 0x500a1b
mov eax, dword [esi]
inc dword [eax + 0x8c]
mov eax, dword [esi]
mov edx, dword [eax + 0x8c]
mov eax, dword [esi]
call fcn.005019b4
mov ebx, eax
mov edx, ebx
mov eax, dword [esi]
mov ecx, dword [eax]
call dword [ecx + 0xc]
test al, al
jne 0x500a02
mov edx, dword [esi]
mov ecx, dword [edx + 0x8c]
mov eax, dword [esi]
mov eax, dword [eax + 0x4c]
sub ecx, eax
mov edx, eax
mov eax, dword [esi]
call fcn.00501aac
jmp 0x501024
mov edx, ebx
mov eax, dword [esi]
mov ecx, dword [eax]
call dword [ecx + 4]
test al, al
je 0x500fb9
mov edx, ebx
mov eax, dword [esi]
mov ecx, dword [eax]
call dword [ecx + 0x10]
test al, al
je 0x500b07
mov edi, 0xffffff96
mov byte [ebp - 0xa], bl
mov eax, dword [esi]
cmp byte [eax + 0x40], 0
je 0x500a8b
mov eax, dword [esi]
mov edx, dword [eax + 0x8c]
mov ecx, 1
mov eax, dword [esi]
call fcn.00501aac
mov eax, dword [esi]
inc dword [eax + 0x8c]
mov eax, dword [esi]
mov eax, dword [eax + 0x8c]
mov edx, dword [esi]
mov dword [edx + 0x4c], eax
mov dl, byte [ebp - 0xa]
mov eax, dword [esi]
mov ecx, dword [eax]
call dword [ecx + 0x1c]
mov eax, dword [esi]
mov eax, dword [eax + 0x4c]
mov edx, dword [esi]
mov edx, dword [edx + 0x8c]
cmp eax, edx
jge 0x500ac8
mov ecx, edx
sub ecx, eax
mov edx, eax
mov eax, dword [esi]
call fcn.00501aac
mov eax, dword [esi]
mov eax, dword [eax + 0x8c]
mov edx, dword [esi]
cmp eax, dword [edx + 0x88]
jg 0x501024
mov eax, dword [esi]
cmp byte [eax + 0x40], 0
je 0x500afa
mov eax, dword [esi]
mov edx, dword [eax + 0x8c]
mov ecx, 1
mov eax, dword [esi]
call fcn.00501aac
mov eax, dword [esi]
inc dword [eax + 0x8c]
jmp 0x501024
mov edx, ebx
mov eax, dword [esi]
mov ecx, dword [eax]
call dword [ecx + 0x20]
test al, al
je 0x500bb2
mov edi, 0xffffff99
mov byte [ebp - 0xa], bl
mov eax, dword [esi]
mov edx, dword [eax + 0x8c]
mov ecx, 1
mov eax, dword [esi]
call fcn.00501aac
mov eax, dword [esi]
inc dword [eax + 0x8c]
mov eax, dword [esi]
mov eax, dword [eax + 0x8c]
mov edx, dword [esi]
mov dword [edx + 0x4c], eax
mov dl, byte [ebp - 0xa]
mov eax, dword [esi]
mov ecx, dword [eax]
call dword [ecx + 0x1c]
mov eax, dword [esi]
mov eax, dword [eax + 0x4c]
mov edx, dword [esi]
cmp eax, dword [edx + 0x8c]
jge 0x500b7b
mov eax, dword [esi]
mov ecx, dword [eax + 0x8c]
mov eax, dword [esi]
sub ecx, dword [eax + 0x4c]
mov eax, dword [esi]
mov edx, dword [eax + 0x4c]
mov eax, dword [esi]
call fcn.00501aac
mov eax, dword [esi]
mov eax, dword [eax + 0x8c]
mov edx, dword [esi]
cmp eax, dword [edx + 0x88]
jg 0x501024
mov eax, dword [esi]
mov edx, dword [eax + 0x8c]
mov ecx, 1
mov eax, dword [esi]
call fcn.00501aac
mov eax, dword [esi]
inc dword [eax + 0x8c]
jmp 0x501024
mov eax, dword [esi]
cmp byte [eax + 0x85], 0
je 0x500e22
cmp bl, 0x24
jne 0x500e22
mov eax, dword [esi]
mov eax, dword [eax + 0x8c]
mov edx, dword [esi]
cmp eax, dword [edx + 0x88]
jge 0x500e22
mov eax, dword [esi]
mov edx, dword [eax + 0x8c]
inc edx
mov eax, dword [esi]
call fcn.005019b4
mov edx, eax
mov eax, dword [esi]
mov ecx, dword [eax]
call dword [ecx + 0xc]
test al, al
jne 0x500e22
mov eax, dword [esi]
mov edi, dword [eax + 0x8c]
cmp edi, 1
je 0x500c2a
mov edx, edi
dec edx
mov eax, dword [esi]
call fcn.005019b4
mov edx, 0x501098
call fcn.004fd4e4
test al, al
je 0x500e22
mov edi, 0xffffff96
mov eax, dword [esi]
cmp byte [eax + 0x40], 0
je 0x500c4b
mov eax, dword [esi]
mov edx, dword [eax + 0x8c]
mov ecx, 1
mov eax, dword [esi]
call fcn.00501aac
mov eax, dword [esi]
inc dword [eax + 0x8c]
mov eax, dword [esi]
mov eax, dword [eax + 0x8c]
mov edx, dword [esi]
mov dword [edx + 0x4c], eax
mov dl, 0x24
mov eax, dword [esi]
mov ecx, dword [eax]
call dword [ecx + 0x1c]
lea eax, [ebp - 0x24]
push eax
mov eax, dword [esi]
mov ecx, dword [eax + 0x8c]
mov eax, dword [esi]
sub ecx, dword [eax + 0x4c]
mov eax, dword [esi]
mov edx, dword [eax + 0x4c]
mov eax, dword [esi]
call fcn.00501ac0
mov eax, dword [esi]
cmp byte [eax + 0x40], 0
je 0x500cb6
mov eax, dword [esi]
mov eax, dword [eax + 0x8c]
mov edx, dword [esi]
cmp eax, dword [edx + 0x4c]
jle 0x500cb6
mov eax, dword [esi]
mov ecx, dword [eax + 0x8c]
mov eax, dword [esi]
sub ecx, dword [eax + 0x4c]
mov eax, dword [esi]
mov edx, dword [eax + 0x4c]
mov eax, dword [esi]
call fcn.00501aac
mov eax, dword [esi]
mov eax, dword [eax + 0x8c]
mov edx, dword [esi]
cmp eax, dword [edx + 0x88]
jg 0x501024
mov eax, dword [esi]
cmp byte [eax + 0x40], 0
je 0x500ce8
mov eax, dword [esi]
mov edx, dword [eax + 0x8c]
mov ecx, 1
mov eax, dword [esi]
call fcn.00501aac
mov eax, dword [esi]
inc dword [eax + 0x8c]
mov eax, dword [esi]
mov eax, dword [eax + 0x8c]
mov edx, dword [esi]
mov dword [edx + 0x4c], eax
mov dl, 0x24
mov eax, dword [esi]
mov ecx, dword [eax]
call dword [ecx + 0x1c]
mov eax, dword [esi]
mov eax, dword [eax + 0x4c]
mov edx, dword [esi]
cmp eax, dword [edx + 0x8c]
jge 0x500d28
mov edx, dword [esi]
mov ecx, dword [edx + 0x8c]
sub ecx, eax
mov edx, eax
mov eax, dword [esi]
call fcn.00501aac
mov eax, dword [esi]
mov eax, dword [eax + 0x8c]
mov dword [ebp - 0x2c], eax
mov edx, dword [esi]
cmp eax, dword [edx + 0x88]
jg 0x500dae
mov edx, eax
mov ecx, 1
mov eax, dword [esi]
call fcn.00501aac
mov eax, dword [esi]
inc dword [eax + 0x8c]
mov eax, dword [esi]
mov eax, dword [eax + 0x8c]
mov edx, dword [esi]
mov dword [edx + 0x4c], eax
mov dl, 0x24
mov eax, dword [esi]
mov ecx, dword [eax]
call dword [ecx + 0x1c]
lea eax, [ebp - 0x28]
push eax
mov eax, dword [esi]
mov ecx, dword [eax + 0x8c]
mov eax, dword [esi]
sub ecx, dword [eax + 0x4c]
mov eax, dword [esi]
mov edx, dword [eax + 0x4c]
mov eax, dword [esi]
call fcn.00501ac0
mov eax, dword [esi]
mov eax, dword [eax + 0x4c]
mov edx, dword [esi]
cmp eax, dword [edx + 0x8c]
jge 0x500dae
mov eax, dword [esi]
mov ecx, dword [eax + 0x8c]
mov eax, dword [esi]
sub ecx, dword [eax + 0x4c]
mov eax, dword [esi]
mov edx, dword [eax + 0x4c]
mov eax, dword [esi]
call fcn.00501aac
mov eax, dword [ebp - 0x28]
mov edx, dword [ebp - 0x24]
call fcn.00404ea4
je 0x500dd1
mov eax, dword [esi]
mov eax, dword [eax + 0x8c]
mov edx, dword [esi]
cmp eax, dword [edx + 0x88]
jle 0x500cf0
mov eax, dword [esi]
mov eax, dword [eax + 0x8c]
mov edx, dword [esi]
cmp eax, dword [edx + 0x88]
jg 0x501024
mov eax, dword [esi]
cmp byte [eax + 0x40], 0
je 0x500e05
mov eax, dword [esi]
mov edx, dword [eax + 0x8c]
mov ecx, 1
mov eax, dword [esi]
call fcn.00501aac
jmp 0x500e15
mov eax, dword [esi]
mov eax, dword [eax + 0x8c]
sub eax, dword [ebp - 0x2c]
mov edx, dword [esi]
sub dword [edx + 0x54], eax
mov eax, dword [esi]
inc dword [eax + 0x8c]
jmp 0x501024
mov edi, 0xffffff9a
mov eax, dword [esi]
mov eax, dword [eax + 0x8c]
inc eax
mov dword [ebp - 0x1c], eax
mov eax, dword [esi]
mov eax, dword [eax + 0x8c]
mov edx, dword [esi]
mov dword [edx + 0x50], eax
mov eax, dword [esi]
xor edx, edx
mov dword [eax + 0x54], edx
mov eax, dword [esi]
mov eax, dword [eax + 0x8c]
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x18], 1
mov eax, dword [esi]
mov edx, dword [eax + 0x8c]
mov ecx, 1
mov eax, dword [esi]
call fcn.00501aac
mov eax, dword [esi]
inc dword [eax + 0x8c]
mov eax, dword [esi]
mov edx, dword [eax + 0x8c]
mov eax, dword [esi]
call fcn.005019b4
mov ebx, eax
mov eax, dword [esi]
mov edx, dword [eax + 0x50]
mov eax, dword [esi]
call fcn.005019b4
mov edx, dword [esi]
and eax, 0xff
bt dword [edx + 0xa4], eax
jb 0x500eab
mov dword [ebp - 0x10], 0xffffffff
jmp 0x500ec8
mov eax, dword [esi]
mov eax, dword [eax + 0xa0]
push eax
mov eax, dword [esi]
mov ecx, dword [eax + 0x54]
mov eax, dword [esi]
mov edx, dword [eax + 0x50]
mov eax, dword [esi]
call fcn.004fffa8
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0xffffffff
je 0x500f25
lea ecx, [ebp - 0x30]
mov eax, dword [esi]
mov eax, dword [eax + 0xa0]
mov edx, dword [ebp - 0x10]
call fcn.004fcaf8
mov edx, dword [ebp - 0x30]
mov eax, dword [esi]
add eax, 0x5c
call fcn.00404adc
mov eax, dword [esi]
mov eax, dword [eax + 0x8c]
mov dword [ebp - 0x1c], eax
mov eax, dword [esi]
mov eax, dword [eax + 0xa0]
mov edx, dword [ebp - 0x10]
call fcn.004fcb18
mov edi, eax
test edi, edi
jg 0x500f2a
mov ecx, 0x3d8
mov edx, 0x5010c0
mov eax, 0x5010f0
call fcn.004049e4
jmp 0x500f2a
mov eax, dword [esi]
dec dword [eax + 0x54]
mov edx, ebx
mov eax, dword [esi]
mov ecx, dword [eax]
call dword [ecx + 4]
test al, al
jne 0x500e59
cmp edi, 0xffffff9a
jne 0x500f89
mov eax, dword [esi]
mov edx, dword [ebp - 0x14]
mov dword [eax + 0x50], edx
mov eax, dword [esi]
mov edx, dword [ebp - 0x18]
mov dword [eax + 0x54], edx
cmp byte [ebp - 0xb], 0
je 0x500fac
mov eax, dword [esi]
mov eax, dword [eax + 0xcc]
call fcn.00404d58
dec eax
jne 0x500fac
mov eax, dword [esi]
mov edx, dword [eax + 0x50]
mov eax, dword [esi]
call fcn.005019b4
mov edx, dword [esi]
mov edx, dword [edx + 0xcc]
cmp al, byte [edx]
sete al
mov edx, dword [esi]
mov byte [edx + 0xd0], al
jmp 0x500fac
cmp byte [ebp - 0xb], 0
je 0x500fac
mov eax, dword [esi]
mov eax, dword [eax + 0xcc]
mov edx, dword [esi]
mov edx, dword [edx + 0x5c]
call fcn.00404ea4
sete al
mov edx, dword [esi]
mov byte [edx + 0xd0], al
mov eax, dword [esi]
mov edx, dword [ebp - 0x1c]
mov dword [eax + 0x8c], edx
jmp 0x501024
push 0x50110c
mov eax, dword [esi]
mov edx, dword [eax + 0x8c]
mov eax, dword [esi]
call fcn.005019b4
mov edx, eax
lea eax, [ebp - 0x38]
call fcn.00404c70
push dword [ebp - 0x38]
push 0x501134
mov eax, dword [esi]
mov edx, dword [eax + 0x8c]
mov eax, dword [esi]
call fcn.005019b4
and eax, 0xff
lea ecx, [ebp - 0x3c]
mov edx, 4
call fcn.00409eec
push dword [ebp - 0x3c]
lea eax, [ebp - 0x34]
mov edx, 4
call fcn.00404e18
mov ecx, dword [ebp - 0x34]
mov dl, 1
mov eax, dword [0x40880c]
call fcn.0040e18c
call fcn.00404404
cmp edi, 0x80000001
jne 0x501040
mov ecx, 0x3f1
mov edx, 0x5010c0
mov eax, 0x5010f0
call fcn.004049e4
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x50106f
lea eax, [ebp - 0x3c]
mov edx, 4
call fcn.00404aac
lea eax, [ebp - 0x28]
mov edx, 2
call fcn.00404aac
ret