Function at 0x508050
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x61ae18
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x64
mov al, byte [ebp - 0xd]
push ebx
push esi
push edi
mov esi, ecx
xor edi, edi
push edi
lea ecx, [ebp - 0x70]
mov dword [ebp - 0x28], edx
mov dword [ebp - 0x18], esi
mov byte [ebp - 0x70], al
call fcn.00404140
push edi
lea ecx, [ebp - 0x50]
mov dword [ebp - 4], edi
call fcn.004f9d70
push edi
lea ecx, [ebp - 0x58]
call fcn.004f9d70
push edi
lea ecx, [ebp - 0x20]
call fcn.00509e90
lea ecx, [ebp - 0x38]
push ecx
lea edx, [ebp - 0x34]
push edx
lea eax, [ebp - 0x30]
push eax
lea ecx, [ebp - 0x2c]
push ecx
mov dword [ebp - 0x1c], edi
lea eax, [ebp - 0x70]
lea edi, [ebp - 0x20]
push eax
lea edx, [ebp - 0x1c]
mov dword [ebp - 0x24], edi
push esi
mov dword [ebp - 0x14], edx
lea ebx, [ebp - 0x58]
lea edi, [ebp - 0x50]
call fcn.0050aa20
add esp, 8
mov ecx, eax
mov edx, edi
call fcn.00508ac0
mov ecx, eax
mov edx, ebx
call fcn.00508ac0
mov edx, dword [ebp - 0x24]
mov ecx, eax
call fcn.00508d40
mov edx, dword [ebp - 0x14]
mov ecx, eax
call fcn.00508d40
mov ecx, eax
call fcn.005087f0
mov ecx, eax
call fcn.005087f0
mov ecx, eax
call fcn.005087f0
mov ecx, eax
call fcn.005087f0
mov ebx, dword [ebp - 0x1c]
push 0
lea ecx, [ebp - 0x24]
call fcn.004f9e00
xor esi, esi
test ebx, ebx
je 0x508088
cmp esi, 0xa
jae 0x508088
test bl, 1
je 0x508081
push 1
push esi
lea ecx, [ebp - 0x24]
call fcn.004f9da0
shr ebx, 1
inc esi
test ebx, ebx
jne 0x50806c
mov ebx, dword [ebp - 0x20]
push 0
lea ecx, [ebp - 0x14]
call fcn.004f9e00
xor esi, esi
test ebx, ebx
je 0x5080b7
cmp esi, 0xa
jae 0x5080b7
test bl, 1
je 0x5080b0
push 1
push esi
lea ecx, [ebp - 0x14]
call fcn.004f9da0
shr ebx, 1
inc esi
test ebx, ebx
jne 0x50809b
mov ecx, dword [ebp - 0x28]
lea eax, [ebp - 0x70]
push eax
call fcn.00507a20
mov esi, eax
mov ecx, dword [esi + 0x3c]
mov edx, dword [esi + 0x40]
mov dword [ebp - 0x40], ecx
lea ecx, [ebp - 0x40]
mov dword [ebp - 0x3c], edx
call fcn.00509730
mov ecx, dword [eax]
mov dword [ebp - 0x48], ecx
mov edx, dword [eax + 4]
lea eax, [ebp - 0x48]
mov dword [ebp - 0x44], edx
push eax
lea edx, [ebp - 0x50]
lea ecx, [ebp - 0x60]
call fcn.00508a70
mov ecx, dword [eax]
mov dword [esi + 4], ecx
mov edx, dword [eax + 4]
lea eax, [ebp - 0x58]
push eax
mov ecx, esi
mov dword [esi + 8], edx
call fcn.00507e70
mov esi, eax
lea ecx, [ebp - 0x14]
lea edi, [esi + 0x18]
push ecx
mov ecx, edi
call fcn.00508a00
mov edx, dword [ebp - 0x14]
mov dword [esi + 0x14], edx
mov eax, dword [ebp - 0x24]
mov dword [edi], eax
mov ecx, dword [ebp - 0x2c]
mov dword [esi + 0x1c], ecx
mov edx, dword [ebp - 0x30]
mov dword [esi + 0x20], edx
mov eax, dword [ebp - 0x34]
mov dword [esi + 0x24], eax
mov ecx, dword [ebp - 0x38]
test ecx, ecx
setne cl
mov byte [esi + 0x28], cl
mov ecx, dword [ebp - 0x6c]
test ecx, ecx
pop edi
pop esi
pop ebx
je 0x508176
mov al, byte [ecx - 1]
test al, al
je 0x50816c
cmp al, 0xff
je 0x50816c
dec al
mov byte [ecx - 1], al
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret
dec ecx
push ecx
call fcn.005f8040
add esp, 4
mov ecx, dword [ebp - 0xc]
mov eax, dword [ebp - 0x18]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret