Function at 0x506798
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
mov ecx, 0x2a
push 0
push 0
dec ecx
jne 0x5067a0
push ecx
push ebx
push esi
push edi
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x50842f
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 4]
call fcn.00508e68
cmp dword [0x526fa4], 0
je 0x507d73
mov eax, dword [0x526fa4]
mov dword [ebp - 8], eax
push 0
lea eax, [ebp - 0x20]
push eax
mov ecx, 0x508448
mov edx, 0x508460
mov eax, dword [ebp - 8]
mov ebx, dword [eax]
call dword [ebx]
mov eax, dword [0x524fd0]
mov al, byte [eax]
mov byte [ebp - 0x2d], al
mov eax, dword [0x524fd0]
mov byte [eax], 0x2e
push 0
push 0
mov edx, 0x508460
mov ecx, 0x508474
mov eax, dword [ebp - 8]
mov ebx, dword [eax]
call dword [ebx + 0x24]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x7888]
fstp qword [eax + 0x10]
wait
mov eax, dword [0x524fd0]
mov dl, byte [ebp - 0x2d]
mov byte [eax], dl
mov dl, 1
mov eax, dword [0x422588]
call fcn.00428670
mov edx, dword [ebp - 4]
mov dword [edx + 0x7a80], eax
mov eax, dword [ebp - 4]
cmp byte [eax + 0x7a84], 0
je 0x5068fb
mov eax, dword [0x527048]
mov eax, dword [eax + 4]
dec eax
test eax, eax
jl 0x506945
inc eax
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x14], 0
mov ebx, dword [ebp - 0x14]
lea ebx, [ebx + ebx*2]
mov eax, dword [0x527048]
mov eax, dword [eax + 8]
mov eax, dword [eax + ebx*4]
lea edx, [ebp - 0x4c]
call fcn.00408c14
mov eax, dword [ebp - 0x4c]
mov edx, dword [ebp - 0x20]
call fcn.00404b00
jne 0x5068ed
mov eax, dword [0x527048]
mov eax, dword [eax + 8]
mov eax, dword [eax + ebx*4 + 8]
xor ecx, ecx
xor edx, edx
mov esi, dword [eax]
call dword [esi + 0x14]
mov eax, dword [0x527048]
mov eax, dword [eax + 8]
mov edx, dword [eax + ebx*4 + 8]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x7a80]
mov ecx, dword [eax]
call dword [ecx + 0x54]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x7a80]
call fcn.00428c40
call fcn.00424630
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x7a80]
call fcn.00428c40
call fcn.00424180
jmp 0x506945
inc dword [ebp - 0x14]
dec dword [ebp - 0x34]
jne 0x506870
jmp 0x506945
mov edx, dword [ebp - 0x20]
mov eax, 0x508484
call fcn.00404cf8
dec eax
jge 0x506922
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x7888]
mov edx, dword [eax + 8]
lea eax, [ebp - 0x20]
mov ecx, dword [ebp - 0x20]
call fcn.00404a00
cmp dword [ebp - 0x20], 0
je 0x506945
mov eax, dword [ebp - 0x20]
call fcn.00409720
test al, al
je 0x506945
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x7a80]
mov edx, dword [ebp - 0x20]
mov ecx, dword [eax]
call dword [ecx + 0x4c]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x7a80]
call fcn.00428d2c
cmp al, 7
je 0x5069ab
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x7a80]
mov dl, 7
call fcn.00429c50
push 0xff00ff
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x7a80]
mov edx, dword [eax]
call dword [edx + 0x20]
push eax
lea eax, [ebp - 0x5c]
push eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x7a80]
mov edx, dword [eax]
call dword [edx + 0x2c]
mov ecx, eax
xor edx, edx
xor eax, eax
call fcn.00406b7c
lea edx, [ebp - 0x5c]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x7a80]
mov cl, 0xff
call fcn.004727d0
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x7a80]
mov dl, 1
mov ecx, dword [eax]
call dword [ecx + 0x3c]
cmp al, 0x8b
inc ebp
cld
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x5c]
mov edx, dword [eax]
call dword [edx + 0x14]
test eax, eax
jle 0x5083fc
mov ecx, 0x508548
mov dl, 1
mov eax, dword [0x464f7c]
call fcn.00465eec
mov dword [ebp - 8], eax
mov dl, 1
mov eax, dword [ebp - 8]
call fcn.00466444
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x5c]
mov eax, dword [ebp - 8]
call fcn.004664a8
mov dl, 1
mov eax, dword [0x4174c8]
call fcn.004038b4
mov dword [ebp - 0xc], eax
mov dl, 1
mov eax, dword [ebp - 0xc]
call fcn.0041baf0
mov dl, 1
mov eax, dword [0x4174c8]
call fcn.004038b4
mov dword [ebp - 0x10], eax
mov dl, 1
mov eax, dword [ebp - 0x10]
call fcn.0041baf0
xor eax, eax
push ebp
push 0x5083f5
push dword fs:[eax]
mov dword fs:[eax], esp
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp - 8]
mov ecx, dword [eax]
call dword [ecx + 0x44]
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x5c]
mov eax, dword [ebp - 8]
call fcn.004664a8
mov eax, dword [ebp - 0xc]
mov edx, dword [eax]
call dword [edx + 0x14]
dec eax
test eax, eax
jl 0x5083c9
inc eax
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x14], 0
lea ecx, [ebp - 0x124]
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0xc]
mov ebx, dword [eax]
call dword [ebx + 0xc]
mov eax, dword [ebp - 0x124]
lea edx, [ebp - 0x120]
call fcn.00408c14
mov eax, dword [ebp - 0x120]
mov edx, 0x508460
call fcn.00404b00
je 0x5083bd
lea ecx, [ebp - 0x128]
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0xc]
mov ebx, dword [eax]
call dword [ebx + 0xc]
mov edx, dword [ebp - 0x128]
mov ecx, dword [ebp - 0x10]
mov eax, dword [ebp - 8]
mov ebx, dword [eax]
call dword [ebx + 0x40]
mov eax, dword [ebp - 0x10]
mov edx, dword [eax]
call dword [edx + 0x14]
dec eax
test eax, eax
jl 0x5083bd
inc eax
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x18], 0
push 0x508558
lea eax, [ebp - 0x20]
push eax
lea ecx, [ebp - 0x12c]
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x10]
mov ebx, dword [eax]
call dword [ebx + 0xc]
mov eax, dword [ebp - 0x12c]
push eax
lea ecx, [ebp - 0x130]
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0xc]
mov ebx, dword [eax]
call dword [ebx + 0xc]
mov edx, dword [ebp - 0x130]
mov eax, dword [ebp - 8]
pop ecx
mov ebx, dword [eax]
call dword [ebx]
mov eax, dword [ebp - 4]
cmp dword [eax + 0x7a80], 0
je 0x5081aa
mov edx, dword [ebp - 0x20]
mov eax, 0x5084dc
call fcn.00404cf8
test eax, eax
jle 0x5081aa
mov eax, dword [ebp - 0x20]
mov edx, 0x5084dc
call fcn.00404b00
je 0x5083b1
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x788c]
call fcn.004059e4
inc eax
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x1c]
push eax
mov eax, dword [ebp - 4]
add eax, 0x788c
mov ecx, 1
mov edx, dword [0x500f80]
call fcn.00405bc0
add esp, 4
mov esi, dword [ebp - 0x1c]
mov eax, esi
shl esi, 3
sub esi, eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x788c]
lea ebx, [eax + esi*8 - 0x38]
lea ecx, [ebp - 0x138]
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x10]
mov edi, dword [eax]
call dword [edi + 0xc]
mov eax, dword [ebp - 0x138]
lea edx, [ebp - 0x134]
call fcn.00408c14
mov edx, dword [ebp - 0x134]
lea eax, [ebx + 8]
call fcn.00404748
lea ecx, [ebp - 0x140]
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0xc]
mov edi, dword [eax]
call dword [edi + 0xc]
mov eax, dword [ebp - 0x140]
lea edx, [ebp - 0x13c]
call fcn.00408c14
mov edx, dword [ebp - 0x13c]
lea eax, [ebx + 4]
call fcn.00404748
mov eax, dword [ebp - 4]
mov dword [ebx + 0x28], eax
lea eax, [ebp - 0x24]
push eax
mov ecx, 0x5084e0
mov edx, dword [ebp - 0x20]
mov eax, 2
call fcn.005004d8
mov ecx, 0x508500
mov edx, dword [ebp - 0x24]
mov eax, 4
call fcn.00503000
push eax
lea eax, [ebp - 0x5c]
push eax
mov ecx, 0x508500
mov edx, dword [ebp - 0x24]
mov eax, 3
call fcn.00503000
push eax
mov ecx, 0x508500
mov edx, dword [ebp - 0x24]
mov eax, 2
call fcn.00503000
push eax
mov ecx, 0x508500
mov edx, dword [ebp - 0x24]
mov eax, 1
call fcn.00503000
pop edx
pop ecx
call fcn.00406b7c
push esi
lea esi, [ebp - 0x5c]
lea edi, [ebx + 0xc]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
pop esi
lea eax, [ebp - 0x24]
push eax
mov ecx, 0x5084e0
mov edx, dword [ebp - 0x20]
mov eax, 3
call fcn.005004d8
mov ecx, 0x508500
mov edx, dword [ebp - 0x24]
mov eax, 1
call fcn.00503000
mov edi, eax
mov word [ebx + 0x1c], di
cmp di, 1
jge 0x508075
mov word [ebx + 0x1c], 1
mov ecx, 0x508500
mov edx, dword [ebp - 0x24]
mov eax, 2
call fcn.00503000
mov edi, eax
mov word [ebx + 0x1e], di
test di, di
jge 0x508098
mov word [ebx + 0x1e], 0
lea eax, [ebp - 0x28]
push eax
mov ecx, 0x508500
mov edx, dword [ebp - 0x24]
mov eax, 3
call fcn.005004d8
cmp dword [ebp - 0x28], 0
je 0x5080cf
mov eax, dword [ebp - 0x28]
call fcn.00409270
mov edi, eax
mov word [ebx + 0x20], di
test di, di
jge 0x5080d5
mov word [ebx + 0x20], 0
jmp 0x5080d5
mov word [ebx + 0x20], 0
lea eax, [ebp - 0x28]
push eax
mov ecx, 0x508500
mov edx, dword [ebp - 0x24]
mov eax, 4
call fcn.005004d8
cmp dword [ebp - 0x28], 0
je 0x5080ff
mov eax, dword [ebp - 0x28]
call fcn.00409270
mov word [ebx + 0x22], ax
jmp 0x508105
mov word [ebx + 0x22], 1
movsx eax, word [ebx + 0x2c]
movsx edx, word [ebx + 0x2e]
add eax, edx
movsx edx, word [ebx + 0x30]
add eax, edx
movsx edx, word [ebx + 0x32]
add eax, edx
test eax, eax
jne 0x50818d
cmp word [ebx + 0x20], 0
je 0x508148
mov ax, word [ebx + 0x20]
mov word [ebx + 0x2c], ax
mov ax, word [ebx + 0x20]
mov word [ebx + 0x2e], ax
mov ax, word [ebx + 0x20]
mov word [ebx + 0x30], ax
mov ax, word [ebx + 0x20]
mov word [ebx + 0x32], ax
jmp 0x50818d
lea eax, [ebx + 0xc]
xor edx, edx
call fcn.00500354
movsx edx, word [ebx + 0x1c]
lea edx, [edx + edx*2]
mov ecx, edx
cdq
idiv ecx
mov word [ebx + 0x2c], ax
lea eax, [ebx + 0xc]
xor edx, edx
call fcn.00500368
movsx edx, word [ebx + 0x1e]
inc edx
lea edx, [edx + edx*2]
mov ecx, edx
cdq
idiv ecx
mov word [ebx + 0x2e], ax
mov ax, word [ebx + 0x2c]
mov word [ebx + 0x30], ax
mov ax, word [ebx + 0x2e]
mov word [ebx + 0x32], ax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x788c]
lea edx, [eax + esi*8 - 0x38]
mov eax, dword [ebp - 4]
call fcn.005030f0
mov dword [ebx + 0x34], eax
jmp 0x5083b1
lea edx, [ebp - 0x144]
mov eax, dword [ebp - 0x20]
call fcn.00408d7c
mov edx, dword [ebp - 0x144]
lea eax, [ebp - 0x20]
call fcn.0040478c
mov edx, dword [ebp - 0x20]
mov eax, 0x5084b0
call fcn.00404cf8
test eax, eax
jle 0x5083b1
mov edx, dword [ebp - 0x20]
mov eax, 0x508484
call fcn.00404cf8
dec eax
jge 0x508202
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x7888]
mov edx, dword [eax + 8]
lea eax, [ebp - 0x20]
mov ecx, dword [ebp - 0x20]
call fcn.00404a00
mov eax, dword [ebp - 0x20]
call fcn.00409720
test al, al
je 0x5083b1
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x788c]
call fcn.004059e4
inc eax
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x1c]
push eax
mov eax, dword [ebp - 4]
add eax, 0x788c
mov ecx, 1
mov edx, dword [0x500f80]
call fcn.00405bc0
add esp, 4
mov eax, dword [ebp - 0x1c]
mov edx, eax
shl eax, 3
sub eax, edx
mov edx, dword [ebp - 4]
mov edx, dword [edx + 0x788c]
lea eax, [edx + eax*8 - 0x38]
mov dword [ebp - 0x48], eax
mov eax, dword [ebp - 0x48]
add eax, 8
call fcn.004046f4
mov eax, dword [ebp - 0x48]
add eax, 4
call fcn.004046f4
mov eax, dword [ebp - 0x48]
mov edx, dword [ebp - 4]
mov dword [eax + 0x28], edx
xor eax, eax
push ebp
push 0x50836d
push dword fs:[eax]
mov dword fs:[eax], esp
mov dl, 1
mov eax, dword [0x422588]
call fcn.00428670
mov ebx, eax
mov eax, dword [ebp - 0x48]
mov dword [eax], ebx
mov eax, ebx
mov edx, dword [ebp - 0x20]
mov ecx, dword [eax]
call dword [ecx + 0x4c]
mov eax, dword [ebp - 0x48]
mov eax, dword [eax]
call fcn.00428d2c
cmp al, 7
je 0x5082f9
mov eax, dword [ebp - 0x48]
mov eax, dword [eax]
mov dl, 7
call fcn.00429c50
push 0xff00ff
mov eax, dword [ebp - 0x48]
mov eax, dword [eax]
mov edx, dword [eax]
call dword [edx + 0x20]
push eax
lea eax, [ebp - 0x5c]
push eax
mov eax, dword [ebp - 0x48]
mov eax, dword [eax]
mov edx, dword [eax]
call dword [edx + 0x2c]
mov ecx, eax
xor edx, edx
xor eax, eax
call fcn.00406b7c
lea edx, [ebp - 0x5c]
mov eax, dword [ebp - 0x48]
mov eax, dword [eax]
mov cl, 0xff
call fcn.004727d0
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x508374
lea ecx, [ebp - 0x14c]
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x10]
mov ebx, dword [eax]
call dword [ebx + 0xc]
mov eax, dword [ebp - 0x14c]
lea edx, [ebp - 0x148]
call fcn.00408c14
mov edx, dword [ebp - 0x148]
mov eax, dword [ebp - 0x48]
add eax, 8
call fcn.00404748
lea ecx, [ebp - 0x154]
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0xc]
mov ebx, dword [eax]
call dword [ebx + 0xc]
mov eax, dword [ebp - 0x154]
lea edx, [ebp - 0x150]
call fcn.00408c14
mov edx, dword [ebp - 0x150]
mov eax, dword [ebp - 0x48]
add eax, 4
call fcn.00404748
ret
inc dword [ebp - 0x18]
dec dword [ebp - 0x38]
jne 0x507e9d
inc dword [ebp - 0x14]
dec dword [ebp - 0x34]
jne 0x507e27
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x5083fc
cmp dword [ebp - 0x10], 0
je 0x5083e4
lea eax, [ebp - 0x10]
call fcn.0040ebcc
lea eax, [ebp - 8]
call fcn.0040ebcc
lea eax, [ebp - 0xc]
call fcn.0040ebcc
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x508436
lea eax, [ebp - 0x154]
mov edx, 0x3e
call fcn.00404718
lea eax, [ebp - 0x4c]
call fcn.004046f4
lea eax, [ebp - 0x28]
mov edx, 3
call fcn.00404718
ret