Function at 0x40e330
Capabilities:
Access peb ldr_data
Get kernel32 base address
Get process heap flags
Get process heap force flags

Disassembly:
push ebp
xor ecx, ecx
mov ebp, esp
push edi
mov edi, 0x110a
push esi
xor esi, esi
push ebx
sub esp, 0x28c
mov dword [esp + 0xc], ecx
mov eax, dword [ebp + 8]
mov dword [esp + 8], esi
mov ebx, dword [ebp + 0xc]
mov dword [esp + 4], edi
mov word [ebp - 0x1a], 0
mov dword [esp], eax
call sym._SendMessageW_16
mov dword [ebp - 0x284], eax
sub esp, 0x10
mov esi, eax
mov dword [esp + 0xc], eax
mov eax, 2
mov dword [esp + 8], eax
mov eax, 0x1102
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sym._SendMessageW_16
mov eax, 4
sub esp, 0x10
mov dword [esp + 8], eax
mov eax, 0x110a
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp + 0xc], esi
mov dword [esp], eax
call sym._SendMessageW_16
mov dword [ebp - 0x270], eax
sub esp, 0x10
mov dword [ebp - 0x280], eax
xor eax, eax
test ebx, ebx
mov dword [ebp - 0x27c], eax
je 0x40e5f9
lea esi, [esi]
lea edi, [edi]
movzx ecx, word [ebx]
mov esi, ebx
test ecx, ecx
setne dl
cmp ecx, 0x5c
mov al, dl
je 0x40e41c
test dl, dl
je 0x40e41c
lea esi, [esi]
lea edi, [edi]
movzx edx, word [esi + 2]
add esi, 2
test edx, edx
setne al
cmp edx, 0x5c
je 0x40e415
test al, al
jne 0x40e400
cmp esi, ebx
sete dl
and al, dl
test al, al
jne 0x40e5f9
lea ecx, [esi + 2]
mov dword [ebp - 0x278], ecx
mov eax, ecx
sub eax, ebx
mov dword [esp], eax
mov edx, eax
sar edx, 1
mov dword [ebp - 0x274], edx
mov edi, edx
call sym._heap_xalloc
mov edx, dword [ebp - 0x274]
mov ecx, dword [ebp - 0x278]
cmp edx, 1
mov dword [ebp - 0x26c], eax
ja 0x40e478
jmp 0x40e680
dec edi
add eax, 2
mov word [eax - 2], dx
add ebx, 2
cmp edi, 1
je 0x40e47f
movzx edx, word [ebx]
test edx, edx
jne 0x40e468
mov word [eax], 0
mov edx, dword [ebp - 0x26c]
mov ebx, 0
cmp word [esi], 0
cmovne ebx, ecx
test edx, edx
je 0x40e5f9
mov eax, dword [ebp - 0x270]
test eax, eax
je 0x40e628
mov dword [ebp + 0xc], ebx
mov edi, eax
mov ebx, dword [ebp + 8]
lea esi, [ebp - 0x222]
jmp 0x40e4eb
mov dword [esp + 0xc], edi
mov eax, 0x110a
mov edi, 1
mov dword [esp + 8], edi
mov dword [esp + 4], eax
mov dword [esp], ebx
call sym._SendMessageW_16
sub esp, 0x10
test eax, eax
mov edi, eax
je 0x40e628
mov dword [esp], ebx
mov eax, 0x11
mov dword [ebp - 0x260], eax
mov eax, 0x104
mov dword [ebp - 0x24c], eax
lea eax, [ebp - 0x260]
mov dword [esp + 0xc], eax
xor eax, eax
mov dword [esp + 8], eax
mov eax, 0x113e
mov dword [esp + 4], eax
mov dword [ebp - 0x25c], edi
mov dword [ebp - 0x250], esi
call sym._SendMessageW_16
mov eax, dword [ebp - 0x26c]
sub esp, 0x10
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x250]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_lstrcmpiW]
sub esp, 8
test eax, eax
jne 0x40e4c0
mov eax, 0x1102
mov esi, 2
mov ebx, dword [ebp + 0xc]
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp + 0xc], edi
mov dword [esp + 8], esi
mov dword [esp], eax
call sym._SendMessageW_16
sub esp, 0x10
test ebx, ebx
je 0x40e698
mov dword [esp + 0xc], edi
mov eax, 4
mov dword [esp + 8], eax
mov eax, 0x110a
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sym._SendMessageW_16
mov ecx, dword [ebp - 0x26c]
xor edx, edx
mov dword [ebp - 0x270], eax
sub esp, 0x10
mov esi, eax
mov dword [esp + 8], ecx
mov dword [esp + 4], edx
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapFree]
mov ecx, 1
mov dword [ebp - 0x27c], ecx
sub esp, 0xc
test esi, esi
je 0x40e6c8
mov dword [ebp - 0x280], edi
test ebx, ebx
jne 0x40e3e0
mov ebx, dword [ebp - 0x27c]
mov eax, dword [ebp - 0x270]
test ebx, ebx
cmove eax, dword [ebp - 0x284]
mov dword [ebp - 0x284], eax
mov eax, dword [ebp - 0x284]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov ecx, dword [ebp - 0x26c]
xor edx, edx
mov dword [esp + 4], edx
mov eax, dword fs:[0x18]
mov dword [esp + 8], ecx
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapFree]
mov ecx, dword [ebp - 0x27c]
mov eax, dword [ebp - 0x280]
sub esp, 0xc
test ecx, ecx
cmove eax, dword [ebp - 0x284]
mov dword [ebp - 0x284], eax
mov eax, dword [ebp - 0x284]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
test edx, edx
je 0x40e484
mov eax, dword [ebp - 0x26c]
jmp 0x40e47f
mov ecx, dword [ebp - 0x26c]
xor ebx, ebx
mov dword [esp + 4], ebx
mov eax, dword fs:[0x18]
mov dword [esp + 8], ecx
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapFree]
mov dword [ebp - 0x284], edi
sub esp, 0xc
jmp 0x40e66b
mov dword [ebp - 0x284], edi
jmp 0x40e66b