Function at 0x407860
Capabilities:
Access peb ldr_data
Get process heap flags

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4714a8
mov eax, dword fs:[0]
push eax
sub esp, 0x38
push ebx
push esi
push edi
mov eax, dword [0x489348]
xor eax, esp
push eax
lea eax, [esp + 0x48]
mov dword fs:[0], eax
mov dword [esp + 0x10], ecx
lea eax, [ecx + 4]
push eax
lea eax, [esp + 0x24]
lea edi, [ecx + 0xc]
push eax
push edi
call fcn.00406270
mov ecx, eax
xor esi, esi
mov dword [esp + 0x50], esi
mov edx, dword [edi]
mov dword [edx + 4], esi
mov eax, dword [edi]
mov ecx, dword [ecx]
lea ebx, [esp + 0x30]
mov dword [esp + 0x38], esi
mov dword [esp + 0x34], esi
mov dword [esp + 0x30], esi
call fcn.00455ed0
mov dword [esp + 0x50], 0xffffffff
mov eax, dword [esp + 0x20]
mov edi, eax
mov eax, dword [eax + 8]
push eax
call fcn.0045d511
add esp, 4
push edi
call fcn.0045d511
mov edi, dword [ebp + 8]
mov eax, dword [edi + 0x28]
lea ebx, [edi + 0x18]
add esp, 4
mov dword [esp + 0x24], eax
cmp dword [ebx + 0xc], eax
jbe 0x407902
call fcn.0045d131
mov ecx, dword [ebx]
mov dword [esp + 0x28], ecx
mov ecx, dword [ebx + 0xc]
mov dword [esp + 0x20], ecx
cmp ecx, dword [ebx + 0x10]
jbe 0x40791d
call fcn.0045d131
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x24]
mov eax, dword [ebx]
push edx
mov edx, dword [esp + 0x2c]
push edx
push ecx
push eax
lea eax, [esp + 0x38]
push eax
call fcn.00407fd0
mov eax, dword [edi + 0x48]
lea ebx, [edi + 0x38]
mov dword [esp + 0x20], eax
cmp dword [ebx + 0xc], eax
jbe 0x407949
call fcn.0045d131
mov ecx, dword [ebx]
mov dword [esp + 0x28], ecx
mov ecx, dword [ebx + 0xc]
mov dword [esp + 0x24], ecx
cmp ecx, dword [ebx + 0x10]
jbe 0x407964
call fcn.0045d131
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x20]
mov eax, dword [ebx]
push edx
mov edx, dword [esp + 0x2c]
push edx
push ecx
push eax
lea eax, [esp + 0x38]
push eax
call fcn.00407fd0
mov ebx, dword [edi + 0x10]
cmp dword [edi + 0xc], ebx
jbe 0x407989
call fcn.0045d131
mov ecx, dword [edi]
mov dword [esp + 0x28], ecx
mov ecx, dword [edi + 0xc]
mov dword [esp + 0x24], ecx
cmp ecx, dword [edi + 0x10]
jbe 0x4079a4
call fcn.0045d131
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x28]
mov eax, dword [edi]
push ebx
push edx
push ecx
push eax
lea eax, [esp + 0x38]
push eax
mov ebx, edi
call fcn.00407fd0
mov ecx, dword [ebp + 0xc]
mov ebx, dword [esp + 0x10]
push ecx
lea edx, [esp + 0x20]
push edx
add ebx, 4
push ebx
call fcn.00406150
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x28]
push ecx
push ebx
mov dword [esp + 0x5c], 1
call fcn.00406270
mov ecx, eax
mov byte [esp + 0x50], 2
mov edx, dword [ebx]
mov dword [edx + 4], esi
mov eax, dword [ebx]
mov ecx, dword [ecx]
lea ebx, [esp + 0x30]
mov dword [esp + 0x38], esi
mov dword [esp + 0x34], esi
mov dword [esp + 0x30], esi
call fcn.00455ed0
mov byte [esp + 0x50], 1
mov eax, dword [esp + 0x24]
mov ebx, eax
mov eax, dword [eax + 8]
push eax
call fcn.0045d511
add esp, 4
push ebx
call fcn.0045d511
mov ecx, dword [ebp + 0xc]
mov ebx, dword [esp + 0x14]
add esp, 4
push ecx
lea edx, [esp + 0x1c]
push edx
add ebx, 0xc
push ebx
call fcn.00406150
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x28]
push ecx
push ebx
mov byte [esp + 0x5c], 3
call fcn.00406270
mov ecx, eax
mov byte [esp + 0x50], 4
mov edx, dword [ebx]
mov dword [edx + 4], esi
mov eax, dword [ebx]
mov ecx, dword [ecx]
lea ebx, [esp + 0x30]
mov dword [esp + 0x38], esi
mov dword [esp + 0x34], esi
mov dword [esp + 0x30], esi
call fcn.00455ed0
mov byte [esp + 0x50], 3
mov eax, dword [esp + 0x24]
mov ebx, eax
mov eax, dword [eax + 8]
push eax
call fcn.0045d511
add esp, 4
push ebx
call fcn.0045d511
mov ecx, dword [ebp + 0xc]
mov ebx, dword [esp + 0x14]
add esp, 4
push ecx
lea edx, [esp + 0x18]
push edx
add ebx, 8
push ebx
call fcn.00406150
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x28]
push ecx
push ebx
mov byte [esp + 0x5c], 5
call fcn.00406270
mov ecx, eax
mov byte [esp + 0x50], 6
mov edx, dword [ebx]
mov dword [edx + 4], esi
mov eax, dword [ebx]
mov ecx, dword [ecx]
lea ebx, [esp + 0x30]
mov dword [esp + 0x38], esi
mov dword [esp + 0x34], esi
mov dword [esp + 0x30], esi
call fcn.00455ed0
mov byte [esp + 0x50], 5
mov eax, dword [esp + 0x24]
mov ebx, eax
mov eax, dword [eax + 8]
push eax
call fcn.0045d511
add esp, 4
push ebx
call fcn.0045d511
add esp, 4
push 1
lea eax, [edi + 0x38]
push eax
mov cl, 1
lea eax, [esp + 0x24]
call fcn.00406300
push 1
push edi
mov cl, 1
lea eax, [esp + 0x1c]
call fcn.00406300
mov ebx, dword [esp + 0x10]
cmp dword [ebx + 0x14], esi
setle cl
cmp dword [ebx + 0x10], esi
setle dl
movzx eax, dl
push eax
lea eax, [edi + 0x18]
push eax
lea eax, [esp + 0x20]
call fcn.00406300
mov ecx, dword [ebx + 0x10]
mov eax, dword [esp + 0x14]
mov dword [edi + 0x30], ecx
mov edx, dword [ebx + 0x14]
mov dword [edi + 0x34], edx
mov esi, eax
mov eax, dword [eax + 8]
push eax
call fcn.0045d511
add esp, 4
push esi
call fcn.0045d511
mov eax, dword [esp + 0x1c]
mov ecx, dword [eax + 8]
add esp, 4
mov esi, eax
push ecx
call fcn.0045d511
add esp, 4
push esi
call fcn.0045d511
mov eax, dword [esp + 0x20]
mov edx, dword [eax + 8]
add esp, 4
push edx
mov esi, eax
call fcn.0045d511
add esp, 4
push esi
call fcn.0045d511
add esp, 4
mov ecx, dword [esp + 0x48]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8