Function at 0x403060
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x4362a1
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
push ebx
push ebp
push esi
push edi
mov eax, dword [0x446650]
xor eax, esp
push eax
lea eax, [esp + 0x30]
mov dword fs:[0], eax
mov esi, dword [esp + 0x40]
xor ebp, ebp
mov dword [esp + 0x18], ebp
mov eax, 1
mov dword [esp + 0x38], eax
mov dword [esi + 4], ebp
mov dword [esi + 8], ebp
mov dword [esi + 0xc], ebp
mov ecx, dword [esp + 0x48]
xor edi, edi
cmp ecx, ebp
mov dword [esp + 0x18], eax
je 0x4030d0
mov ebx, dword [esp + 0x44]
mov eax, dword [ebx]
cmp dword [eax - 0xc], ebp
jl 0x4030d0
push ecx
push eax
call fcn.004210f4
add esp, 8
cmp eax, ebp
je 0x4030d0
sub eax, dword [ebx]
mov ebx, eax
jmp 0x4030d3
or ebx, 0xffffffff
cmp ebx, ebp
mov eax, dword [esp + 0x48]
mov ecx, dword [eax - 0xc]
mov dword [esp + 0x24], ecx
jl 0x4031ea
mov dword [esp + 0x14], 1
jmp 0x4030f2
xor ebp, ebp
mov eax, dword [esp + 0x4c]
cmp eax, ebp
jle 0x403104
cmp dword [esp + 0x14], eax
je 0x4031ea
mov ecx, dword [esp + 0x44]
mov edx, ebx
sub edx, edi
push edx
push edi
lea eax, [esp + 0x28]
push eax
call fcn.00401f80
mov ebp, eax
mov byte [esp + 0x38], 3
mov eax, dword [esi + 4]
test eax, eax
jne 0x40312a
xor edx, edx
jmp 0x403132
mov edx, dword [esi + 8]
sub edx, eax
sar edx, 2
test eax, eax
je 0x403168
mov ecx, dword [esi + 0xc]
sub ecx, eax
sar ecx, 2
cmp edx, ecx
jae 0x403168
mov edx, dword [esp + 0x48]
mov edi, dword [esi + 8]
mov byte [esp + 0x1c], 0
mov ecx, dword [esp + 0x1c]
push ecx
push edx
push ebp
push 1
push edi
call fcn.00404f50
add esp, 0x14
add edi, 4
mov dword [esi + 8], edi
jmp 0x403183
mov edi, dword [esi + 8]
cmp eax, edi
jbe 0x403174
call fcn.004221dc
push edi
push esi
push ebp
lea eax, [esp + 0x34]
push eax
mov eax, esi
call fcn.00404510
mov byte [esp + 0x38], 1
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4031a8
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x24]
lea edi, [ecx + ebx]
test edi, edi
mov ebx, dword [esp + 0x44]
mov eax, dword [ebx]
mov ecx, dword [eax - 0xc]
jl 0x4031da
cmp edi, ecx
jg 0x4031da
mov edx, dword [esp + 0x48]
push edx
add eax, edi
push eax
call fcn.004210f4
add esp, 8
test eax, eax
je 0x4031da
sub eax, dword [ebx]
mov ebx, eax
jmp 0x4031dd
or ebx, 0xffffffff
add dword [esp + 0x14], 1
test ebx, ebx
jge 0x4030f0
mov ecx, dword [esp + 0x44]
push edi
lea eax, [esp + 0x28]
push eax
call fcn.00404260
mov ebx, eax
mov byte [esp + 0x38], 2
call fcn.00404390
mov byte [esp + 0x38], 1
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40322a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x38], 0
mov eax, dword [esp + 0x48]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40324f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, esi
mov ecx, dword [esp + 0x30]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28
ret