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

Disassembly:
lea edx, [eax + 3]
shr edx, 3
cmp eax, 0xa2c
push ebx
mov cl, byte [0x542055]
ja 0x401db8
test cl, cl
movzx eax, byte [edx + 0x5428e4]
lea ebx, [eax*8 + 0x52f06c]
jne 0x401bd8
mov edx, dword [ebx + 4]
mov eax, dword [edx + 8]
mov ecx, 0xfffffff8
cmp edx, ebx
je 0x401ba8
add dword [edx + 0xc], 1
and ecx, dword [eax - 4]
mov dword [edx + 8], ecx
mov dword [eax - 4], edx
je 0x401bc8
mov byte [ebx], 0
pop ebx
ret
mov edx, dword [ebx + 0x10]
movzx ecx, word [ebx + 2]
add ecx, eax
cmp eax, dword [ebx + 0xc]
ja 0x401c2c
add dword [edx + 0xc], 1
mov dword [ebx + 8], ecx
mov byte [ebx], 0
mov dword [eax - 4], edx
pop ebx
ret
mov ecx, dword [edx + 4]
mov dword [ecx + 0x14], ebx
mov dword [ebx + 4], ecx
mov byte [ebx], 0
pop ebx
ret
mov eax, pe_nt_image_headers32
lock cmpxchg byte [ebx], ah
je 0x401b82
add ebx, 0x20
mov eax, pe_nt_image_headers32
lock cmpxchg byte [ebx], ah
je 0x401b82
add ebx, 0x20
mov eax, pe_nt_image_headers32
lock cmpxchg byte [ebx], ah
je 0x401b82
sub ebx, 0x40
pause
cmp byte [0x5428dd], 0
jne 0x401bd8
push 0
call sub.kernel32.dll_Sleep
mov eax, pe_nt_image_headers32
lock cmpxchg byte [ebx], ah
je 0x401b82
push 0xa
call sub.kernel32.dll_Sleep
jmp 0x401bd8
push esi
push edi
cmp byte [0x542055], 0
je 0x401c70
mov eax, pe_nt_image_headers32
lock cmpxchg byte [0x542a3c], ah
je 0x401c70
pause
cmp byte [0x5428dd], 0
jne 0x401c37
push 0
call sub.kernel32.dll_Sleep
mov eax, pe_nt_image_headers32
lock cmpxchg byte [0x542a3c], ah
je 0x401c70
push 0xa
call sub.kernel32.dll_Sleep
jmp 0x401c37
movsx esi, byte [ebx + 1]
and esi, dword [0x542a48]
je 0x401cec
bsf eax, esi
lea esi, [eax*8]
mov ecx, dword [eax*4 + 0x542a4c]
bsf ecx, ecx
lea ecx, [ecx + esi*4]
lea edi, [ecx*8 + 0x542acc]
mov esi, dword [edi + 4]
mov edx, dword [esi + 4]
mov dword [edi + 4], edx
mov dword [edx], edi
cmp edi, edx
jne 0x401cc0
mov edx, 0xfffffffe
rol edx, cl
and dword [eax*4 + 0x542a4c], edx
jne 0x401cc0
btr dword [0x542a48], eax
mov edi, 0xfffffff0
and edi, dword [esi - 4]
cmp edi, 0x10a60
jb 0x401d3c
mov edx, edi
movzx edi, word [ebx + 0x1a]
sub edx, edi
lea eax, [edi + esi]
lea ecx, [edx + 3]
mov dword [eax - 4], ecx
mov dword [edx + eax - 8], edx
call fcn.00401778
jmp 0x401d41
movzx ecx, word [ebx + 0x18]
mov edi, dword [0x542a44]
cmp edi, ecx
jb 0x401d20
mov esi, dword [0x542a40]
movzx ecx, word [ebx + 0x1a]
lea edx, [ecx + 0xb30]
cmp edi, edx
jb 0x401d10
mov edi, ecx
sub esi, edi
sub dword [0x542a44], edi
mov dword [0x542a40], esi
jmp 0x401d41
movzx eax, word [ebx + 0x1a]
mov edi, eax
call fcn.00401844
mov esi, eax
test eax, eax
jne 0x401d41
mov byte [0x542a3c], al
mov byte [ebx], al
pop edi
pop esi
pop ebx
ret
and byte [edi + esi - 4], 0xf7
lea ecx, [edi + 6]
mov dword [esi - 4], ecx
xor eax, eax
mov byte [0x542a3c], al
mov dword [esi], ebx
mov dword [esi + 8], eax
mov dword [esi + 0xc], 1
mov dword [ebx + 0x10], esi
lea eax, [esi + 0x20]
movzx ecx, word [ebx + 2]
lea edx, [ecx + eax]
mov dword [ebx + 8], edx
add edi, esi
sub edi, ecx
mov dword [ebx + 0xc], edi
mov byte [ebx], 0
mov dword [eax - 4], esi
pop edi
pop esi
pop ebx
ret
mov eax, pe_nt_image_headers32
lock cmpxchg byte [0x542a3c], ah
je 0x401dd6
pause
cmp byte [0x5428dd], 0
jne 0x401d7c
push 0
call sub.kernel32.dll_Sleep
mov eax, pe_nt_image_headers32
lock cmpxchg byte [0x542a3c], ah
je 0x401dd6
push 0xa
call sub.kernel32.dll_Sleep
jmp 0x401d7c
cmp eax, 0x40a2c
ja 0x401ed0
lea ebx, [eax + 0xd3]
and ebx, 0xffffff00
add ebx, 0x30
test cl, cl
jne 0x401d7c
lea edx, [ebx - 0xb30]
mov ecx, edx
shr edx, 0xd
shr ecx, 8
mov eax, 0xffffffff
shl eax, cl
and eax, dword [edx*4 + 0x542a4c]
je 0x401e00
and ecx, 0xffffffe0
bsf eax, eax
or ecx, eax
jmp 0x401e5c
mov eax, 0xfffffffe
mov ecx, edx
shl eax, cl
and eax, dword [0x542a48]
je 0x401e28
bsf edx, eax
mov eax, dword [edx*4 + 0x542a4c]
bsf ecx, eax
mov eax, edx
aam 0x89
push ebp
fdivr dword [eax + 0x18]
call 0x894c5eee
inc ebp
in al, dx
inc ebp
cld
add byte [eax], al
add byte [eax], al