Function at 0x402110
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
mov edi, ecx
push esi
mov esi, edx
push ebx
mov ebx, eax
sub esp, 0x4c
mov eax, dword [0x41d258]
cmp dword [0x41d25c], eax
je 0x402350
xor ecx, ecx
mov edx, 0xc
mov dword [esp + 8], edx
mov dword [esp + 4], ecx
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
mov dword [ebp - 0x2c], eax
sub esp, 0xc
test eax, eax
je 0x402343
mov eax, ebx
mov ecx, edi
mov edx, esi
call sym._append_path
mov ebx, eax
mov eax, dword [ebp - 0x2c]
test ebx, ebx
mov dword [eax], ebx
je 0x402303
mov dword [esp], 0x417f74
lea eax, [ebp - 0x20]
mov dword [esp + 0x10], eax
mov eax, 0x418444
mov dword [esp + 0xc], eax
mov eax, 1
mov dword [esp + 8], eax
xor eax, eax
mov dword [esp + 4], eax
call sym._CoCreateInstance_20
sub esp, 0x14
test eax, eax
js 0x4022fe
mov eax, dword [ebp - 0x20]
lea ecx, [ebp - 0x1c]
mov edx, dword [eax]
mov dword [esp + 8], ecx
mov ecx, 0x4195e4
mov dword [esp + 4], ecx
mov dword [esp], eax
call dword [edx]
sub esp, 0xc
test eax, eax
js 0x4022f0
mov eax, dword [ebp - 0x1c]
xor ecx, ecx
mov edx, dword [eax]
mov dword [esp + 8], ecx
mov dword [esp + 4], ebx
mov dword [esp], eax
call dword [edx + 0x14]
mov ebx, 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 ebx, ebx
js 0x4022f0
mov ebx, dword [ebp - 0x20]
test ebx, ebx
je 0x4022fe
mov eax, ebx
call sym._extract_icon
mov edx, dword [ebp - 0x2c]
cmp edi, 0xffffffff
mov dword [edx + 4], eax
je 0x402418
lea ecx, [edi + edi - 2]
add ecx, esi
jae 0x402247
jmp 0x402253
sub ecx, 2
cmp esi, ecx
ja 0x402253
cmp word [ecx], 0x2e
jne 0x402240
sub ecx, esi
sar ecx, 1
mov edi, ecx
lea edi, [edi + edi + 2]
xor edx, edx
mov dword [esp + 8], edi
mov dword [esp + 4], edx
mov eax, dword fs:[0x18]
mov dword [ebp - 0x34], edi
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
mov eax, dword [ebp - 0x30]
call eax
sub esp, 0xc
test eax, eax
je 0x40229b
lea edx, [edi - 2]
mov edi, eax
mov dword [ebp - 0x30], edx
cmp edx, 8
jae 0x4023e8
mov ecx, dword [ebp - 0x30]
rep movsb byte es:[edi], byte [esi]
mov word [eax + edx], 0
mov edi, dword [ebp - 0x2c]
mov dword [edi + 8], eax
mov eax, dword [ebx]
mov dword [esp], ebx
call dword [eax + 8]
mov ebx, dword [edi + 4]
sub esp, 4
test ebx, ebx
je 0x4023a0
mov eax, dword [edi + 8]
test eax, eax
je 0x4023a6
mov eax, dword [0x41d25c]
lea edx, [eax + 1]
mov dword [0x41d25c], edx
mov edx, dword [0x41d260]
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 eax, dword [ebp - 0x2c]
mov ebx, dword [eax]
mov esi, dword [sym.imp.kernel32.dll_HeapFree]
mov dword [esp + 8], ebx
xor eax, eax
mov dword [esp + 4], eax
mov edi, dword fs:[0x18]
mov eax, dword [edi + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call esi
mov eax, dword [ebp - 0x2c]
xor edx, edx
sub esp, 0xc
mov dword [esp + 8], eax
mov dword [esp + 4], edx
mov eax, dword [edi + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call esi
sub esp, 0xc
lea esp, [ebp - 0xc]
xor eax, eax
pop ebx
pop esi
pop edi
pop ebp
ret
lea edx, [eax + eax]
mov dword [ebp - 0x2c], edx
shl eax, 3
mov dword [esp + 0xc], eax
mov eax, dword [0x41d260]
mov edx, dword fs:[0x18]
mov dword [esp + 8], eax
xor eax, eax
mov dword [esp + 4], 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 0x402343
mov dword [0x41d260], eax
mov eax, dword [ebp - 0x2c]
mov dword [0x41d258], eax
jmp 0x402130
mov eax, dword [ebp - 0x2c]
mov eax, dword [eax + 8]
mov dword [esp + 8], eax
xor ecx, ecx
mov esi, dword [sym.imp.kernel32.dll_HeapFree]
mov dword [esp + 4], ecx
mov edx, dword fs:[0x18]
mov eax, dword [edx + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call esi
mov ebx, dword [ebp - 0x2c]
mov eax, dword [ebx + 4]
sub esp, 0xc
mov dword [esp], eax
call sym._DestroyIcon_4
mov ebx, dword [ebx]
sub esp, 4
jmp 0x402309
test al, 1
jne 0x402468
test edi, 2
jne 0x402450
test edi, 4
je 0x402290
mov ecx, dword [esi]
add edi, 4
add esi, 4
mov dword [edi - 4], ecx
sub dword [ebp - 0x30], 4
jmp 0x402290
cmp word [esi], 0
je 0x402440
mov ecx, esi
add ecx, 2
cmp word [ecx], 0
jne 0x402420
sub ecx, esi
mov edi, ecx
sub ecx, 2
sar edi, 1
jmp 0x402230
mov ecx, 0xfffffffe
xor edi, edi
jmp 0x402230
movzx ecx, word [esi]
add edi, 2
add esi, 2
mov word [edi - 2], cx
sub dword [ebp - 0x30], 2
jmp 0x4023f4
movzx ecx, byte [esi]
lea edi, [eax + 1]
inc esi
mov byte [eax], cl
mov ecx, dword [ebp - 0x34]
sub ecx, 3
mov dword [ebp - 0x30], ecx
jmp 0x4023ec