Function at 0x505a40
Capabilities:
Access peb ldr_data

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x5a4150
push eax
mov dword fs:[0], esp
sub esp, 0x44
push ebx
push ebp
mov ebp, dword [esp + 0x5c]
push esi
xor esi, esi
push edi
cmp ebp, esi
jne 0x505a7c
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
mov ecx, dword [esp + 0x44]
mov dword fs:[0], ecx
add esp, 0x50
ret
mov ecx, dword [0x66758c]
mov edi, dword [0x667588]
sub ecx, edi
mov eax, 0x66666667
imul ecx
sar edx, 3
mov eax, edx
xor ebx, ebx
shr eax, 0x1f
add edx, eax
mov dword [esp + 0x64], edx
je 0x505adb
mov edx, edi
cmp dword [edx + 0xc], esi
jbe 0x505acf
mov edi, ebp
or ecx, 0xffffffff
xor eax, eax
mov esi, dword [edx]
repne scasb al, byte es:[edi]
mov eax, dword [edx + 4]
not ecx
dec ecx
sub eax, esi
cmp eax, ecx
jne 0x505acd
mov edi, ebp
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x505bea
xor esi, esi
mov eax, dword [esp + 0x64]
inc ebx
add edx, 0x14
cmp ebx, eax
jb 0x505aa5
mov dword [esp + 0x14], esi
mov dword [esp + 0x24], esi
mov dword [esp + 0x28], esi
mov dword [esp + 0x2c], esi
or ebx, 0xffffffff
mov edi, str.Patch_
mov ecx, ebx
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov dword [esp + 0x5c], esi
add ecx, str.Patch_
push ecx
push str.Patch_
lea ecx, [esp + 0x2c]
call fcn.00402ac0
lea eax, [esp + 0x24]
push ebp
lea ecx, [esp + 0x34]
push eax
push ecx
mov dword [esp + 0x68], 1
call fcn.0049dc30
mov eax, dword [eax]
lea edx, [esp + 0x70]
push edx
lea ecx, [esp + 0x28]
lea edx, [esp + 0x2c]
push ecx
push edx
lea ecx, [esp + 0x2c]
lea edx, [esp + 0x38]
push ecx
push edx
push eax
call fcn.00528370
mov eax, dword [esp + 0x5c]
mov ecx, dword [esp + 0x54]
add esp, 0x24
sub eax, ecx
cmp ecx, esi
je 0x505b6d
cmp eax, esi
je 0x505b6d
push eax
push ecx
call fcn.00402e90
add esp, 8
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x24]
sub eax, ecx
cmp ecx, esi
mov dword [esp + 0x5c], ebx
je 0x505b8d
cmp eax, esi
je 0x505b8d
push eax
push ecx
call fcn.00402e90
add esp, 8
cmp dword [esp + 0x14], esi
jne 0x505d21
mov al, byte [0x6675e8]
test al, al
je 0x505cc9
lea eax, [esp + 0x13]
lea ecx, [esp + 0x3c]
push eax
mov dword [esp + 0x38], esi
mov dword [esp + 0x3c], esi
call fcn.004024a0
mov edi, 0x5a8fd0
mov dword [esp + 0x30], edi
push ebp
mov ecx, 0x6675bc
mov dword [esp + 0x60], 2
call fcn.00480c10
mov ecx, eax
cmp ecx, esi
jge 0x505c11
mov dword [esp + 0x30], edi
mov dword [esp + 0x5c], 3
jmp 0x505c56
mov edx, dword [0x667588]
lea ecx, [ebx + ebx*4]
pop edi
pop esi
lea eax, [edx + ecx*4 + 0x10]
pop ebp
mov ecx, dword [eax]
inc ecx
mov dword [eax], ecx
mov eax, ebx
pop ebx
mov ecx, dword [esp + 0x44]
mov dword fs:[0], ecx
add esp, 0x50
ret
mov edx, dword [0x6675c0]
mov eax, dword [0x6675bc]
sub edx, eax
mov eax, 0x2aaaaaab
imul edx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add edx, eax
cmp ecx, edx
jae 0x505c4a
lea edx, [esp + 0x30]
push edx
push ecx
mov ecx, 0x6675bc
call fcn.00480b00
test al, al
jne 0x505c81
or ebx, 0xffffffff
mov dword [esp + 0x30], edi
mov dword [esp + 0x5c], 4
lea ecx, [esp + 0x30]
call fcn.00481850
lea ecx, [esp + 0x3c]
mov dword [esp + 0x5c], ebx
call fcn.004026e0
pop edi
pop esi
mov eax, ebx
pop ebp
pop ebx
mov ecx, dword [esp + 0x44]
mov dword fs:[0], ecx
add esp, 0x50
ret
lea eax, [esp + 0x64]
lea ecx, [esp + 0x18]
push eax
lea edx, [esp + 0x20]
push ecx
lea eax, [esp + 0x1c]
push edx
mov edx, dword [esp + 0x44]
lea ecx, [esp + 0x2c]
push eax
push ecx
push edx
call fcn.005285c0
add esp, 0x18
mov dword [esp + 0x30], edi
lea ecx, [esp + 0x30]
mov dword [esp + 0x5c], 5
call fcn.00481850
or ebx, 0xffffffff
lea ecx, [esp + 0x3c]
mov dword [esp + 0x5c], ebx
jmp 0x505d01
push ebp
lea eax, [esp + 0x4c]
push 0x6675b0
push eax
call fcn.0049dc30
lea ecx, [esp + 0x70]
lea edx, [esp + 0x24]
push ecx
push edx
lea ecx, [esp + 0x30]
lea edx, [esp + 0x28]
push ecx
push edx
mov edx, dword [eax]
lea ecx, [esp + 0x3c]
push ecx
push edx
call fcn.00528370
add esp, 0x24
lea ecx, [esp + 0x48]
call fcn.004026e0
cmp dword [esp + 0x14], esi
jne 0x505d21
pop edi
pop esi
mov eax, ebx
pop ebp
pop ebx
mov ecx, dword [esp + 0x44]
mov dword fs:[0], ecx
add esp, 0x50
ret
call fcn.00505dc0
mov ecx, dword [0x667588]
mov esi, eax
mov edi, ebp
lea eax, [esi + esi*4]
lea ebx, [ecx + eax*4]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
add ecx, ebp
push ecx
push ebp
mov ecx, ebx
call fcn.00403200
mov dword [ebx + 0x10], 1
add ebx, 0xc
push ebx
push 1
mov dword [ebx], 0
call fcn.00527ef0
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x1c]
push edx
mov edx, dword [esp + 0x2c]
push eax
mov eax, dword [ebx]
push ecx
push edx
push eax
call fcn.00528190
mov ecx, dword [esp + 0x34]
mov edx, dword [esp + 0x38]
mov eax, dword [esp + 0x30]
push ecx
mov ecx, dword [esp + 0x40]
push edx
push eax
push ecx
call fcn.00528780
mov ecx, dword [esp + 0x80]
add esp, 0x2c
mov eax, esi
mov dword fs:[0], ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x50
ret