Function at 0x5b4020
Capabilities:
Access peb ldr_data
Check for peb beingdebugged flag

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffa4
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x5c], ebx
mov dword [ebp - 0x58], ebx
mov esi, edx
lea edi, [ebp - 0x24]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov byte [ebp - 1], cl
mov esi, eax
mov edi, dword [ebp + 8]
add edi, 0xfffffffc
xor eax, eax
push ebp
push 0x5b43c4
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [edi]
add eax, 0x5a
call fcn.005fa83c
mov edx, eax
mov eax, esi
mov ecx, dword [eax]
call dword [ecx + 0x40]
mov eax, dword [edi]
add eax, 0x5a
call fcn.005fa858
mov edx, eax
mov eax, esi
mov ecx, dword [eax]
call dword [ecx + 0x34]
mov eax, esi
call fcn.0042f990
mov dword [ebp - 0x10], eax
mov eax, dword [edi]
mov ebx, dword [eax + 0xcc]
test ebx, ebx
je 0x5b40e1
mov eax, dword [ebp - 0x18]
push eax
lea eax, [ebp - 0x44]
push eax
mov eax, dword [edi]
mov ecx, dword [eax + 0xcc]
add ecx, dword [ebp - 0x24]
mov edx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x24]
call fcn.0041c1a4
lea eax, [ebp - 0x44]
push eax
mov eax, esi
mov edx, dword [eax]
call dword [edx + 0x20]
push eax
lea eax, [ebp - 0x54]
push eax
mov ecx, ebx
xor edx, edx
xor eax, eax
call fcn.0041c1a4
lea eax, [ebp - 0x54]
push eax
mov eax, dword [edi]
mov eax, dword [eax + 0x18]
call fcn.0042f990
mov ecx, eax
mov eax, dword [ebp - 0x10]
pop edx
call fcn.0042a768
mov eax, dword [edi]
cmp dword [eax + 0xd0], 0
je 0x5b4156
mov eax, dword [ebp - 0x18]
push eax
lea eax, [ebp - 0x44]
push eax
mov eax, dword [edi]
push dword [eax + 0xd0]
mov ebx, dword [ebp - 0x1c]
mov eax, ebx
pop edx
sub eax, edx
mov ecx, ebx
mov edx, dword [ebp - 0x20]
call fcn.0041c1a4
lea eax, [ebp - 0x44]
push eax
mov eax, esi
mov edx, dword [eax]
call dword [edx + 0x20]
push eax
lea eax, [ebp - 0x54]
push eax
mov eax, esi
mov edx, dword [eax]
call dword [edx + 0x2c]
push eax
mov eax, esi
mov edx, dword [eax]
call dword [edx + 0x2c]
mov edx, dword [edi]
sub eax, dword [edx + 0xd0]
xor edx, edx
pop ecx
call fcn.0041c1a4
lea eax, [ebp - 0x54]
push eax
mov eax, dword [edi]
mov eax, dword [eax + 0x18]
call fcn.0042f990
mov ecx, eax
mov eax, dword [ebp - 0x10]
pop edx
call fcn.0042a768
mov eax, dword [edi]
mov eax, dword [eax + 0xcc]
add dword [ebp - 0x24], eax
mov eax, dword [edi]
mov eax, dword [eax + 0xd0]
sub dword [ebp - 0x1c], eax
lea eax, [ebp - 0x24]
call fcn.005fa83c
mov ebx, eax
mov eax, esi
mov edx, dword [eax]
call dword [edx + 0x2c]
mov edx, dword [edi]
sub eax, dword [edx + 0xcc]
mov edx, dword [edi]
sub eax, dword [edx + 0xd0]
cdq
idiv ebx
test eax, eax
jl 0x5b4272
inc eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 0xc], 0
mov eax, esi
mov edx, dword [eax]
call dword [edx + 0x2c]
mov edx, dword [edi]
sub eax, dword [edx + 0xd0]
mov edx, dword [edi]
mov edx, dword [edx + 0xcc]
mov ecx, dword [ebp - 0xc]
imul ecx, ebx
add edx, ecx
add edx, ebx
cmp eax, edx
jge 0x5b41f0
mov eax, esi
mov edx, dword [eax]
call dword [edx + 0x2c]
mov edx, dword [edi]
sub eax, dword [edx + 0xd0]
mov edx, dword [edi]
mov edx, dword [edx + 0xcc]
mov ecx, dword [ebp - 0xc]
imul ecx, ebx
add edx, ecx
add edx, ebx
sub edx, eax
mov dword [ebp - 8], edx
jmp 0x5b41f5
xor eax, eax
mov dword [ebp - 8], eax
mov eax, dword [ebp - 0x18]
push eax
lea eax, [ebp - 0x44]
push eax
mov ecx, dword [ebp - 0x1c]
sub ecx, dword [ebp - 8]
mov edx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x24]
call fcn.0041c1a4
lea eax, [ebp - 0x44]
push eax
mov eax, esi
mov edx, dword [eax]
call dword [edx + 0x20]
push eax
lea eax, [ebp - 0x54]
push eax
mov eax, dword [edi]
mov ecx, dword [eax + 0xcc]
mov eax, dword [ebp - 0xc]
imul ebx
add ecx, eax
add ecx, ebx
sub ecx, dword [ebp - 8]
mov eax, dword [edi]
mov eax, dword [eax + 0xcc]
mov edx, dword [ebp - 0xc]
imul edx, ebx
add eax, edx
xor edx, edx
call fcn.0041c1a4
lea eax, [ebp - 0x54]
push eax
mov eax, dword [edi]
mov eax, dword [eax + 0x18]
call fcn.0042f990
push eax
mov eax, esi
call fcn.0042f990
pop ecx
pop edx
call fcn.0042a768
inc dword [ebp - 0xc]
dec dword [ebp - 0x14]
jne 0x5b41a3
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0x14]
mov dl, 1
call fcn.0042a354
mov eax, dword [edi]
cmp byte [eax + 0x88], 0
je 0x5b429f
mov eax, dword [edi]
mov edx, dword [eax + 0xa8]
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0xc]
call fcn.00429a6c
jmp 0x5b42f0
cmp byte [ebp - 1], 0
je 0x5b42ba
mov eax, dword [edi]
mov edx, dword [eax + 0xa4]
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0xc]
call fcn.00429a6c
jmp 0x5b42f0
mov eax, dword [edi]
mov eax, dword [eax + 0x8c]
cmp byte [eax + 0x39], 0
je 0x5b42dd
mov eax, dword [edi]
mov edx, dword [eax + 0xa0]
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0xc]
call fcn.00429a6c
jmp 0x5b42f0
mov eax, dword [edi]
mov edx, dword [eax + 0x9c]
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0xc]
call fcn.00429a6c
mov eax, dword [edi]
mov edx, dword [eax + 0x90]
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0xc]
call fcn.00429c94
mov eax, dword [edi]
mov dl, byte [eax + 0x98]
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0xc]
call fcn.00429d38
mov eax, dword [edi]
mov edx, dword [eax + 0x94]
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0xc]
call fcn.00429c54
mov eax, dword [edi]
push esi
push edi
lea esi, [eax + 0xac]
lea edi, [ebp - 0x34]
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 edi
pop esi
push 0x400
mov eax, esi
call fcn.0042f990
push eax
lea eax, [ebp - 0x58]
mov edx, dword [edi]
mov edx, dword [edx + 0x8c]
mov edx, dword [edx + 0x30]
call fcn.00404d68
mov edx, dword [ebp - 0x58]
lea ecx, [ebp - 0x34]
pop eax
call fcn.005f9fa8
add dword [ebp - 0x2c], 2
mov eax, dword [edi]
mov eax, dword [eax + 4]
mov eax, dword [eax + 0x30c]
mov edx, 5
call fcn.004562b4
push eax
mov eax, esi
call fcn.0042f990
push eax
lea eax, [ebp - 0x5c]
mov edx, dword [edi]
mov edx, dword [edx + 0x8c]
mov edx, dword [edx + 0x30]
call fcn.00404d68
mov edx, dword [ebp - 0x5c]
lea ecx, [ebp - 0x34]
pop eax
call fcn.005f9fa8
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x5b43cb
lea eax, [ebp - 0x5c]
mov edx, 2
call fcn.00404c2c
ret