Function at 0x40d780
Capabilities:
Access peb ldr_data
Get ntdll base address
Get process heap flags
Get process heap force flags

Disassembly:
push edi
lea edi, [esp + 8]
and esp, 0xfffffff0
push dword [edi - 4]
push ebp
mov ebp, esp
push edi
push esi
mov esi, eax
push ebx
mov ebx, edx
sub esp, 0x7c
test byte [0x411084], 8
jne 0x40da88
test esi, esi
je 0x40dac2
mov eax, dword [ebx + 0xc]
test al, 8
je 0x40d7cd
mov edx, dword [esi + 0x14]
mov eax, dword [ebx + 0x118]
xor eax, edx
and eax, dword [ebx + 0x11c]
xor eax, edx
mov dword [esi + 0x14], eax
mov eax, dword [ebx + 0xc]
test al, 2
je 0x40d806
mov eax, dword [esi + 8]
test eax, eax
je 0x40d7e3
mov dword [esp], eax
call sub.user32.dll_DestroyIcon
sub esp, 4
mov eax, dword [ebx + 0x14]
mov dword [esp], eax
call sub.user32.dll_CopyIcon
mov dword [esi + 8], eax
mov eax, dword [esi + 0x20]
sub esp, 4
cmp eax, 0xffffffff
je 0x40d803
mov edx, eax
call fcn.0040cc30
mov eax, dword [ebx + 0xc]
test al, 1
jne 0x40da30
test al, 4
jne 0x40da41
test al, 0x10
je 0x40d826
cmp dword [ebx], 0x1e7
ja 0x40dae0
test byte [esi + 0x14], 1
je 0x40d848
mov eax, esi
call fcn.0040d640
mov eax, 1
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
lea esp, [edi - 8]
pop edi
ret
test byte [0x411084], 8
jne 0x40dc40
cmp dword [esi + 0x20], 0xffffffff
jne 0x40d833
mov eax, dword [0x418428]
mov ebx, dword [0x41842c]
mov edx, dword [0x418424]
cmp eax, ebx
jb 0x40d8cf
mov eax, 0x20
add ebx, ebx
cmp ebx, eax
cmovb ebx, eax
lea eax, [ebx*4]
test edx, edx
je 0x40dcd0
mov dword [esp + 8], edx
mov dword [esp + 0xc], eax
mov dword [esp + 4], 0
mov ecx, dword fs:[0x18]
mov eax, dword [ecx + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapReAlloc]
sub esp, 0x10
mov edx, eax
test edx, edx
je 0x40d833
mov eax, dword [0x418428]
mov dword [0x418424], edx
mov dword [0x41842c], ebx
lea ecx, [eax + 1]
mov dword [esi + 0x20], eax
mov dword [edx + eax*4], esi
mov eax, esi
mov dword [0x418428], ecx
call fcn.0040d560
mov eax, dword [0x418428]
sub eax, 1
mov edx, eax
call fcn.0040cc30
cmp dword [0x418428], 1
je 0x40dc80
lea eax, [ebp - 0x48]
mov dword [ebp - 0x4c], eax
mov eax, dword [0x418380]
test eax, eax
je 0x40dca0
mov dword [esp + 0x2c], 0
mov dword [esp + 0x28], 0
mov dword [esp + 0x24], 0
mov eax, dword [0x418430]
mov dword [esp + 0x1c], 0x80000000
mov dword [esp + 0x18], 0x80000000
mov dword [esp + 0x14], 0x80000000
mov dword [esp + 0x20], eax
mov dword [esp + 0x10], 0x80000000
mov dword [esp + 0xc], 0x80000001
mov dword [esp + 8], 0
mov dword [esp + 4], str.tooltips_class32
mov dword [esp], 8
call sub.user32.dll_CreateWindowExW
lea edx, [ebp - 0x44]
mov ecx, 0xb
mov ebx, eax
mov dword [esi + 0x10], eax
mov edi, edx
xor eax, eax
rep stosd dword es:[edi], eax
mov eax, dword [0x418430]
sub esp, 0x30
mov dword [ebp - 0x48], 0x30
mov dword [ebp - 0x40], eax
lea eax, [esi + 0x24]
mov dword [ebp - 0x24], eax
mov eax, dword [esi + 0x20]
cmp eax, 0xffffffff
je 0x40d9ff
mov edi, dword [0x418418]
mov ecx, dword [0x41840c]
sub ecx, dword [0x418414]
imul eax, edi
mov edx, eax
mov eax, dword [0x418410]
sub eax, edx
mov edx, ecx
shr edx, 0x1f
movd xmm1, eax
add edx, ecx
mov ecx, eax
sub ecx, edi
sar edx, 1
movd xmm0, ecx
mov ecx, dword [0x418414]
movd xmm3, edx
punpckldq xmm0, xmm3
add ecx, edx
movd xmm2, ecx
punpckldq xmm1, xmm2
punpcklqdq xmm0, xmm1
movaps xmmword [ebp - 0x38], xmm0
mov eax, dword [ebp - 0x4c]
mov dword [esp], ebx
mov dword [esp + 8], 0
mov dword [esp + 4], 0x432
mov dword [esp + 0xc], eax
call sub.user32.dll_SendMessageW
mov eax, esi
sub esp, 0x10
call fcn.0040d4d0
jmp 0x40d833
mov eax, dword [ebx + 0x10]
mov dword [esi + 0x1c], eax
mov eax, dword [ebx + 0xc]
test al, 4
je 0x40d816
lea edi, [esi + 0x24]
mov dword [ebp - 0x50], edi
lea eax, [ebx + 0x18]
mov edx, edi
lea edi, [ebx + 0x116]
jmp 0x40da66
add eax, 2
add edx, 2
mov word [edx - 2], cx
cmp eax, edi
je 0x40da6e
movzx ecx, word [eax]
test cx, cx
jne 0x40da58
xor eax, eax
mov word [edx], ax
cmp dword [esi + 0x20], 0xffffffff
jne 0x40dba0
mov eax, dword [ebx + 0xc]
jmp 0x40d816
mov eax, dword [edx + 4]
mov dword [esp + 0x14], eax
mov eax, dword [edx + 8]
mov dword [esp + 0xc], str.id0x_x__hwnd_p_n
mov dword [esp + 8], str.modify_icon
mov dword [esp + 4], 0x411084
mov dword [esp + 0x10], eax
mov dword [esp], 3
call fcn.0040d2f0
test esi, esi
jne 0x40d7ad
test byte [0x411084], 4
jne 0x40dc00
xor eax, eax
jmp 0x40d838
lea eax, [ebx + 0x120]
lea edx, [esi + 0x124]
lea edi, [ebx + 0x31e]
jmp 0x40db06
add eax, 2
add edx, 2
mov word [edx - 2], cx
cmp edi, eax
je 0x40db0e
movzx ecx, word [eax]
test cx, cx
jne 0x40daf8
lea eax, [ebx + 0x324]
xor edi, edi
mov word [edx], di
lea edx, [esi + 0x324]
lea edi, [ebx + 0x3a2]
jmp 0x40db3e
add eax, 2
add edx, 2
mov word [edx - 2], cx
cmp edi, eax
je 0x40db46
movzx ecx, word [eax]
test cx, cx
jne 0x40db30
xor ecx, ecx
mov word [edx], cx
mov eax, dword [ebx + 0x3a4]
mov edx, 0x7530
mov dword [esi + 0x3a4], eax
mov eax, dword [ebx + 0x320]
cmp eax, edx
cmova eax, edx
mov edx, 0x2710
cmp eax, edx
cmovb eax, edx
mov dword [esi + 0x3a8], eax
mov eax, dword [ebx + 0x3b8]
mov dword [esi + 0x3ac], eax
mov eax, esi
call fcn.0040d4d0
test byte [esi + 0x14], 1
je 0x40d848
jmp 0x40d82c
lea eax, [ebp - 0x48]
mov ecx, 0xb
lea edx, [ebp - 0x44]
mov dword [ebp - 0x4c], eax
xor eax, eax
mov edi, edx
rep stosd dword es:[edi], eax
mov eax, dword [0x418430]
mov dword [ebp - 0x48], 0x30
mov edi, dword [ebp - 0x50]
mov dword [ebp - 0x40], eax
mov eax, dword [ebp - 0x4c]
mov dword [ebp - 0x24], edi
mov dword [esp + 8], 0
mov dword [esp + 4], 0x439
mov dword [esp + 0xc], eax
mov eax, dword [esi + 0x10]
mov dword [esp], eax
call sub.user32.dll_SendMessageW
mov eax, dword [ebx + 0xc]
sub esp, 0x10
jmp 0x40d816
mov eax, dword [ebx + 4]
mov dword [esp + 0x14], eax
mov eax, dword [ebx + 8]
mov dword [esp + 0xc], str.Invalid_icon_ID__0x_x__for_HWND__p_n
mov dword [esp + 8], str.modify_icon
mov dword [esp + 4], 0x411084
mov dword [esp + 0x10], eax
mov dword [esp], 2
call fcn.0040d2f0
xor eax, eax
jmp 0x40d838
mov eax, dword [esi + 0xc]
mov dword [esp + 0x14], eax
mov eax, dword [esi + 0x18]
mov dword [esp + 0xc], str.id0x_x__hwnd_p_n
mov dword [esp + 8], str.show_icon
mov dword [esp + 4], 0x411084
mov dword [esp + 0x10], eax
mov dword [esp], 3
call fcn.0040d2f0
jmp 0x40d855
mov edx, dword [0x418420]
test edx, edx
jne 0x40d901
call fcn.0040d050
jmp 0x40d901
mov eax, 8
mov edx, 0x4008
mov dword [ebp - 0x48], eax
mov eax, dword [ebp - 0x4c]
mov dword [ebp - 0x44], edx
mov dword [esp], eax
call fcn.0040f0e0
mov dword [0x418380], 1
sub esp, 4
jmp 0x40d914
mov dword [esp + 8], eax
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 dword [sym.imp.kernel32.dll_HeapAlloc]
sub esp, 0xc
mov edx, eax
jmp 0x40d8b6