Function at 0x10050380
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1021d400
mov eax, dword fs:[0]
push eax
sub esp, 0x28
push ebx
push esi
push edi
mov eax, dword [0x104fb780]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov esi, ecx
mov dword [ebp - 0x14], esi
mov eax, dword [esi + 8]
mov ecx, dword [esi + 0xc]
mov dword [ebp - 4], 0
cmp dword [eax + 0x30], 0
jne 0x100503d3
mov eax, dword [ecx + 0x20]
mov ebx, dword [ecx + 0x1c]
inc eax
mov dword [ebp - 0x28], 1
jmp 0x100503e0
mov eax, dword [ecx + 0x1c]
mov ebx, dword [ecx + 0x20]
dec eax
or ecx, 0xffffffff
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x2c], eax
cmp ebx, eax
je 0x1005058b
mov eax, dword [esi + 8]
mov ecx, ebx
sub ecx, dword [eax + 0x3c]
mov eax, dword [eax + 0x5c]
lea ecx, [eax + ecx*4]
mov eax, dword [esi + 0xc]
mov eax, dword [eax + 4]
add eax, dword [ecx]
xor edi, edi
mov dword [ebp - 0x1c], eax
mov eax, dword [esi + 8]
mov dword [ebp - 0x24], edi
mov ecx, dword [eax + 0x70]
mov esi, dword [eax + 0x6c]
sub ecx, esi
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp edi, eax
jae 0x1005056f
lea eax, [edi*8]
sub eax, edi
lea edi, [esi + eax*4]
mov esi, dword [edi + 0x14]
mov dword [ebp - 0x20], edi
test ebx, ebx
js 0x1005044e
mov eax, ebx
cdq
idiv esi
mov ecx, eax
jmp 0x10050464
mov eax, esi
test esi, esi
js 0x10050459
sub eax, ebx
dec eax
jmp 0x1005045d
not eax
sub eax, ebx
cdq
idiv esi
mov ecx, eax
neg ecx
imul ecx, esi
mov eax, ebx
sub eax, ecx
jne 0x10050563
mov edx, dword [ebp - 0x14]
mov ecx, dword [edi + 0x10]
mov edi, dword [edx + 8]
mov edx, dword [edi + 0x34]
test edx, edx
js 0x10050488
mov eax, edx
cdq
idiv ecx
jmp 0x1005049e
test ecx, ecx
js 0x10050493
mov eax, ecx
sub eax, edx
dec eax
jmp 0x10050499
not edx
sub edx, ecx
mov eax, edx
cdq
idiv ecx
neg eax
mov edx, dword [edi + 0x38]
mov dword [ebp - 0x18], eax
test edx, edx
js 0x100504b1
mov eax, edx
cdq
idiv ecx
mov edi, eax
jmp 0x100504c9
test ecx, ecx
js 0x100504bc
mov eax, ecx
sub eax, edx
dec eax
jmp 0x100504c2
not edx
sub edx, ecx
mov eax, edx
cdq
idiv ecx
mov edi, eax
neg edi
mov ecx, dword [ebp - 0x20]
cmp byte [ecx + 0x18], 0
je 0x100504f7
sub edi, dword [ebp - 0x18]
lea eax, [ebp - 0x1c]
mov esi, dword [ebp - 0x14]
inc edi
push edi
push dword [ecx]
mov ecx, dword [esi + 8]
push dword [ecx + 0x68]
push eax
call fcn.10057310
mov edi, dword [ebp - 0x24]
add esp, 0x10
inc edi
jmp 0x10050406
mov eax, dword [ecx + 4]
mov dword [ebp - 0x30], eax
test ebx, ebx
js 0x10050508
mov eax, ebx
cdq
idiv esi
jmp 0x1005051c
mov eax, esi
test esi, esi
js 0x10050513
sub eax, ebx
dec eax
jmp 0x10050517
not eax
sub eax, ebx
cdq
idiv esi
neg eax
mov esi, dword [ebp - 0x20]
mov ecx, dword [ecx + 0xc]
imul ecx, eax
mov edx, dword [esi + 8]
mov eax, edx
imul eax, dword [ebp - 0x18]
push dword [esi]
add ecx, dword [ebp - 0x30]
mov esi, dword [ebp - 0x14]
add eax, ecx
mov dword [ebp - 0x30], eax
mov eax, edx
imul eax, edi
add eax, ecx
mov ecx, dword [esi + 8]
push dword [ecx + 0x68]
push edx
push eax
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x1c]
push eax
call fcn.10056a50
mov edi, dword [ebp - 0x24]
add esp, 0x18
inc edi
jmp 0x10050406
mov edi, dword [ebp - 0x24]
mov esi, dword [ebp - 0x14]
inc edi
jmp 0x10050406
mov esi, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x1c]
mov eax, dword [esi + 0xc]
cmp dword [eax + 0x10], ecx
jae 0x10050580
mov dword [eax + 0x10], ecx
add ebx, dword [ebp - 0x28]
mov eax, dword [ebp - 0x2c]
jmp 0x100503e3
mov ecx, dword [esi + 0xc]
cmp ebx, dword [ecx + 0x14]
jl 0x10050598
cmp ebx, dword [ecx + 0x18]
jle 0x100505e3
mov eax, dword [ecx + 4]
mov dword [ecx + 8], eax
mov ecx, dword [esi + 0xc]
mov eax, dword [ecx + 0x10]
sub eax, dword [ecx + 4]
mov dword [ecx + 0xc], eax
mov edx, dword [esi + 0xc]
mov ecx, dword [edx + 0x24]
test ecx, ecx
je 0x100505dc
mov eax, dword [ecx]
lea edi, [ebp - 0x30]
push edi
push dword [edx + 0x14]
push dword [edx + 0xc]
push dword [edx + 8]
call dword [eax + 0xc]
mov ecx, dword [esi + 0xc]
mov edx, dword [ecx + 0xc]
cmp eax, edx
jge 0x100505f5
mov dword [ecx + 0xc], eax
mov ecx, dword [esi + 0xc]
mov eax, dword [ebp - 0x30]
mov dword [ecx + 8], eax
mov eax, dword [esi + 0xc]
mov byte [eax + 0x28], 0
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 8]
cmp dword [eax + 0x68], 0
jne 0x100505dc
push edx
push dword [ecx + 0x18]
push dword [ecx + 0x14]
push ecx
push eax
call fcn.100501f0
add esp, 0x14
jmp 0x100505dc