Function at 0x404160
Capabilities:
Access peb ldr_data
Get kernel32 base address
Get process heap force flags

Disassembly:
push 0xffffffffffffffff
push 0x4e77e8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x18
push ebx
push ebp
push esi
mov ebx, ecx
push edi
mov dword [esp + 0x24], ebx
mov dword [esp + 0x1c], 0
call fcn.004cc87a
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [esp + 0x14], eax
mov dword [esp + 0x30], 0
call fcn.004cc87a
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
lea esi, [eax + 0x10]
mov dword [esp + 0x10], esi
mov edi, dword [esp + 0x3c]
push 0x4f004f
lea ecx, [esp + 0x18]
mov byte [esp + 0x34], 1
mov dword [esp + 0x1c], edi
call fcn.00401fb0
test edi, edi
je 0x404406
jmp 0x4041e0
mov eax, dword [esp + 0x18]
push eax
lea ecx, [esp + 0x20]
push ecx
mov ecx, dword [ebx + 0x5c]
call fcn.004c704b
mov ecx, dword [eax]
lea eax, [ecx - 0x10]
lea edi, [esi - 0x10]
cmp eax, edi
mov byte [esp + 0x30], 2
je 0x40424d
mov edx, dword [edi + 0xc]
test edx, edx
lea esi, [edi + 0xc]
jl 0x40423b
mov edx, dword [eax]
cmp edx, dword [edi]
jne 0x40423b
push eax
call fcn.00401be0
mov ebp, eax
add esp, 4
or eax, 0xffffffff
lock xadd dword [esi], eax
dec eax
test eax, eax
jg 0x404232
mov ecx, dword [edi]
mov edx, dword [ecx]
push edi
call dword [edx + 4]
lea esi, [ebp + 0x10]
mov dword [esp + 0x10], esi
jmp 0x40424d
mov eax, dword [ecx - 0xc]
push eax
push ecx
lea ecx, [esp + 0x18]
call fcn.00402280
mov esi, dword [esp + 0x10]
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
mov byte [esp + 0x30], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x404270
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
push 0x3a
push esi
call fcn.004b3956
add esp, 8
test eax, eax
jne 0x404284
or eax, 0xffffffff
jmp 0x404288
sub eax, esi
sar eax, 1
dec eax
push eax
lea eax, [esp + 0x40]
push eax
lea ecx, [esp + 0x18]
call fcn.00403c00
mov edi, dword [esp + 0x3c]
push esi
push edi
mov byte [esp + 0x38], 3
call fcn.004b3ec2
add esp, 8
test eax, eax
je 0x404314
mov eax, dword [edi - 0xc]
push 1
dec eax
push eax
lea ecx, [esp + 0x44]
call fcn.004039a0
mov edi, dword [esp + 0x3c]
lea eax, [edi - 0x10]
add esi, 0xfffffff0
cmp eax, esi
je 0x404314
mov ecx, dword [esi + 0xc]
test ecx, ecx
lea ebp, [esi + 0xc]
jl 0x404306
mov ecx, dword [eax]
cmp ecx, dword [esi]
jne 0x404306
push eax
call fcn.00401be0
add esp, 4
mov ebx, eax
or edx, 0xffffffff
lock xadd dword [ebp], edx
dec edx
test edx, edx
jg 0x4042fd
mov ecx, dword [esi]
mov eax, dword [ecx]
push esi
call dword [eax + 4]
add ebx, 0x10
mov dword [esp + 0x10], ebx
jmp 0x404314
mov eax, dword [edi - 0xc]
push eax
push edi
lea ecx, [esp + 0x18]
call fcn.00402280
push 0x4efeb0
lea ecx, [esp + 0x14]
call fcn.00403f10
lea ecx, [esp + 0x14]
push ecx
lea edx, [esp + 0x14]
push edx
lea eax, [esp + 0x28]
push eax
call fcn.00402420
add esp, 0xc
mov ecx, dword [eax]
mov esi, dword [esp + 0x14]
lea eax, [ecx - 0x10]
add esi, 0xfffffff0
cmp eax, esi
mov byte [esp + 0x30], 4
je 0x404395
mov edx, dword [esi + 0xc]
test edx, edx
lea ebp, [esi + 0xc]
jl 0x404387
mov edx, dword [eax]
cmp edx, dword [esi]
jne 0x404387
push eax
call fcn.00401be0
mov ebx, eax
add esp, 4
or eax, 0xffffffff
lock xadd dword [ebp], eax
dec eax
test eax, eax
jg 0x40437e
mov ecx, dword [esi]
mov edx, dword [ecx]
push esi
call dword [edx + 4]
add ebx, 0x10
mov dword [esp + 0x14], ebx
jmp 0x404395
mov eax, dword [ecx - 0xc]
push eax
push ecx
lea ecx, [esp + 0x1c]
call fcn.00402280
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
mov byte [esp + 0x30], 3
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4043b8
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov ecx, dword [esp + 0x18]
mov ebx, dword [esp + 0x24]
mov eax, dword [ebx + 0x5c]
mov edx, dword [eax + 0x1c]
push ecx
push 3
push 0x110a
push edx
call dword [sym.imp.USER32.dll_SendMessageW]
mov esi, eax
lea eax, [edi - 0x10]
mov dword [esp + 0x18], esi
mov byte [esp + 0x30], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4043fa
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
test esi, esi
mov esi, dword [esp + 0x10]
jne 0x4041e0
push 0x5c
lea ecx, [esp + 0x18]
call fcn.00403bb0
mov edi, dword [esp + 0x14]
add edi, 0xfffffff0
push edi
call fcn.00401be0
mov ebp, dword [esp + 0x3c]
add eax, 0x10
mov dword [ebp], eax
lea eax, [esi - 0x10]
add esp, 4
mov byte [esp + 0x30], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40444a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov dword [esp + 0x30], 0xffffffff
lea eax, [edi + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x404469
mov ecx, dword [edi]
mov edx, dword [ecx]
push edi
call dword [edx + 4]
mov ecx, dword [esp + 0x28]
pop edi
pop esi
mov eax, ebp
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x24
ret 8