Function at 0x401b10
Capabilities:
Access peb ldr_data
Check for peb beingdebugged flag
Get kernel32 base address
Get process heap flags
Get process heap force flags

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
mov esi, eax
push ebx
mov ebx, edx
sub esp, 0x4c
mov dword [ebp - 0x2c], ecx
mov eax, dword [0x4124a4]
cmp dword [0x4124b0], eax
je 0x401d68
mov dword [esp + 8], 0xc
mov dword [esp + 4], 0
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
mov eax, dword [sym.imp.kernel32.dll_HeapAlloc]
mov dword [ebp - 0x30], eax
call eax
sub esp, 0xc
mov edi, eax
test eax, eax
je 0x401d57
mov ecx, dword [ebp - 0x2c]
mov eax, esi
mov edx, ebx
call sym._append_path
mov dword [edi], eax
mov esi, eax
test eax, eax
je 0x401d10
lea eax, [ebp - 0x20]
mov dword [esp + 0xc], 0x416fe4
mov dword [esp + 0x10], eax
mov dword [esp + 8], 1
mov dword [esp + 4], 0
mov dword [esp], 0x414d24
call dword [0x41c554]
sub esp, 0x14
test eax, eax
js 0x401d0e
mov eax, dword [ebp - 0x20]
lea ecx, [ebp - 0x1c]
mov edx, dword [eax]
mov dword [esp + 8], ecx
mov dword [esp + 4], 0x4168c4
mov dword [esp], eax
call dword [edx]
sub esp, 0xc
test eax, eax
js 0x401d00
mov eax, dword [ebp - 0x1c]
mov edx, dword [eax]
mov dword [esp + 4], esi
mov dword [esp + 8], 0
mov dword [esp], eax
call dword [edx + 0x14]
mov esi, eax
mov eax, dword [ebp - 0x1c]
sub esp, 0xc
mov edx, dword [eax]
mov dword [esp], eax
call dword [edx + 8]
sub esp, 4
test esi, esi
js 0x401d00
mov esi, dword [ebp - 0x20]
test esi, esi
je 0x401d0e
mov eax, esi
call sym._extract_icon
mov dword [edi + 4], eax
mov eax, dword [ebp - 0x2c]
cmp eax, 0xffffffff
je 0x401df0
lea ecx, [eax + eax - 2]
add ecx, ebx
jae 0x401c47
jmp 0x401c54
sub ecx, 2
cmp ebx, ecx
ja 0x401c54
cmp word [ecx], 0x2e
jne 0x401c40
sub ecx, ebx
sar ecx, 1
mov dword [ebp - 0x2c], ecx
mov eax, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x30]
mov dword [esp + 4], 0
lea eax, [eax + eax + 2]
mov edx, eax
mov dword [esp + 8], edx
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
mov dword [ebp - 0x2c], edx
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call ecx
sub esp, 0xc
mov edx, eax
test eax, eax
je 0x401caf
mov eax, dword [ebp - 0x2c]
mov dword [esp], edx
mov dword [esp + 4], ebx
sub eax, 2
mov dword [ebp - 0x30], edx
mov dword [esp + 8], eax
call sym._memcpy
mov eax, dword [ebp - 0x2c]
mov edx, dword [ebp - 0x30]
xor ecx, ecx
mov word [edx + eax - 2], cx
mov dword [edi + 8], edx
mov eax, dword [esi]
mov dword [esp], esi
call dword [eax + 8]
mov eax, dword [edi + 4]
sub esp, 4
test eax, eax
mov eax, dword [edi + 8]
je 0x401db0
test eax, eax
je 0x401db0
mov eax, dword [0x4124b0]
lea edx, [eax + 1]
mov dword [0x4124b0], edx
mov edx, dword [0x4123fc]
mov dword [edx + eax*4], edi
lea esp, [ebp - 0xc]
mov eax, 1
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [ebp - 0x20]
mov edx, dword [eax]
mov dword [esp], eax
call dword [edx + 8]
sub esp, 4
mov esi, dword [edi]
mov ebx, dword [sym.imp.kernel32.dll_HeapFree]
mov edx, dword fs:[0x18]
mov dword [esp + 8], esi
mov dword [esp + 4], 0
mov eax, dword [edx + 0x30]
mov dword [ebp - 0x2c], edx
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call ebx
mov edx, dword [ebp - 0x2c]
sub esp, 0xc
mov dword [esp + 8], edi
mov dword [esp + 4], 0
mov eax, dword [edx + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call ebx
sub esp, 0xc
lea esp, [ebp - 0xc]
xor eax, eax
pop ebx
pop esi
pop edi
pop ebp
ret
lea edi, [eax + eax]
shl eax, 3
mov dword [esp + 4], 0
mov dword [esp + 0xc], eax
mov eax, dword [0x4123fc]
mov edx, dword fs:[0x18]
mov dword [esp + 8], eax
mov eax, dword [edx + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapReAlloc]
sub esp, 0x10
test eax, eax
je 0x401d57
mov dword [0x4123fc], eax
mov dword [0x4124a4], edi
jmp 0x401b31
mov dword [esp + 8], eax
mov ebx, dword [sym.imp.kernel32.dll_HeapFree]
mov dword [esp + 4], 0
mov edx, dword fs:[0x18]
mov eax, dword [edx + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call ebx
mov eax, dword [edi + 4]
sub esp, 0xc
mov dword [esp], eax
call dword [sym.imp.user32.dll_DestroyIcon]
mov esi, dword [edi]
sub esp, 4
jmp 0x401d16
cmp word [ebx], 0
je 0x401e1a
mov ecx, ebx
lea esi, [esi]
nop
add ecx, 2
cmp word [ecx], 0
jne 0x401e00
sub ecx, ebx
mov eax, ecx
sub ecx, 2
sar eax, 1
mov dword [ebp - 0x2c], eax
jmp 0x401c31
mov dword [ebp - 0x2c], 0
mov ecx, 0xfffffffe
jmp 0x401c31