Function at 0x40a150
Capabilities:
Access peb ldr_data

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x59380d
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x68
mov eax, dword [0x5de00c]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, ecx
mov dword [ebp - 0x4c], eax
mov edx, dword [ebx + 0x18]
add eax, 0x3c
mov ecx, dword [ebx + 8]
mov esi, dword [ebx + 0xc]
mov edi, dword [ebx + 0x24]
mov dword [ebp - 0x50], edx
mov edx, dword [ebx + 0x1c]
mov dword [ebp - 0x74], edx
mov edx, dword [ebx + 0x20]
mov dword [ebp - 0x70], edx
mov edx, dword [ebx + 0x28]
mov dword [ebp - 0x60], ecx
mov ecx, dword [ebx + 0x10]
mov dword [ebp - 0x58], edx
mov edx, dword [ebx + 0x2c]
mov dword [ebp - 0x54], ecx
mov ecx, dword [ebx + 0x14]
mov dword [ebp - 0x68], edx
mov edx, dword [ebx + 0x30]
push ecx
mov dword [ebp - 0x48], edx
mov edx, dword [ebx + 0x34]
push eax
mov dword [ebp - 0x6c], esi
mov dword [ebp - 0x64], ecx
mov dword [ebp - 0x5c], edx
call fcn.004097e0
mov ecx, dword [ebp - 0x4c]
cmp eax, 0x10000
movzx eax, ax
jne 0x40a1f3
movzx eax, word [ecx + 0x5e]
mov edx, dword [ebp - 0x50]
push dword [ebp - 0x64]
cwde
mov dword [edx], eax
lea eax, [ecx + 0x24]
push eax
call fcn.004097e0
mov ecx, dword [ebp - 0x58]
push dword [ebp - 0x64]
mov word [ecx], ax
mov eax, dword [ebp - 0x4c]
add eax, 0x48
push eax
call fcn.004097e0
or edx, 0xffffffff
movzx ecx, ax
cmp eax, 0x10000
mov eax, dword [ebp - 0x48]
cmovne edx, ecx
cmp dword [ebp - 0x54], 0
mov word [eax], dx
je 0x40a5cd
mov eax, dword [ebp - 0x50]
mov edx, dword [0x5e4608]
mov dword [ebp - 0x58], 0
mov dword [ebp - 0x48], edx
mov ecx, dword [eax]
movzx eax, cx
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x4c]
movsx eax, word [eax + 0x5e]
cmp ecx, eax
je 0x40a2b2
test edx, edx
je 0x40a5cd
push dword [ebp - 0x5c]
mov eax, dword [ebp - 0x54]
mov ecx, edx
push dword [ebp - 0x44]
add eax, 0x1c
push eax
call fcn.004366d0
mov esi, eax
mov dword [ebp - 0x6c], esi
test esi, esi
jne 0x40a2b2
push 0xa0
call fcn.0052d778
mov edx, dword [ebp - 0x50]
add esp, 4
mov ecx, eax
mov dword [ebp - 0x58], eax
push dword [ebp - 0x5c]
push dword [ebp - 0x54]
push dword [edx]
push dword [ebp - 0x60]
call fcn.00437b90
mov dword [ebp - 0x6c], eax
mov dword [ebp - 0x58], 1
mov eax, dword [ebp - 0x4c]
xorps xmm0, xmm0
mov ecx, dword [ebp - 0x64]
movups xmmword [ebp - 0x2c], xmm0
mov dword [ebp - 0x1c], 0
mov edx, dword [eax + 0x10]
mov dword [ebp - 0x18], 0
cmp edx, ecx
jb 0x40a5ef
sub edx, ecx
mov esi, 1
cmp edx, esi
cmovb esi, edx
cmp dword [eax + 0x14], 8
mov dword [ebp - 0x44], esi
mov edx, eax
mov esi, dword [ebp - 0x6c]
jb 0x40a2f4
mov edx, dword [eax]
push dword [ebp - 0x44]
lea eax, [edx + ecx*2]
push eax
lea ecx, [ebp - 0x2c]
call fcn.00403d10
push 0x5aab9c
lea ecx, [ebp - 0x2c]
mov dword [ebp - 4], 0
call fcn.0040b1a0
test eax, eax
jne 0x40a385
lea eax, [ebp - 0x40]
mov ecx, esi
push eax
push 0x3000
push dword [ebp - 0x60]
call fcn.00437ce0
mov ax, word [ebp - 0x30]
test ax, ax
je 0x40a33f
cwde
mov dword [edi], eax
mov eax, dword [esi + 0x64]
jmp 0x40a348
mov eax, dword [esi + 0x64]
mov dword [edi], eax
movsx eax, word [ebp - 0x2e]
cmp dword [ebp - 0x58], 0
mov dword [edi + 4], eax
je 0x40a371
test esi, esi
je 0x40a371
mov eax, dword [esi + 4]
test eax, eax
je 0x40a363
push eax
call dword [sym.imp.GDI32.dll_DeleteObject]
push 0xa0
push esi
call fcn.0052d747
add esp, 8
lea ecx, [ebp - 0x2c]
mov esi, 1
call fcn.00403990
mov eax, esi
jmp 0x40a5cf
cmp dword [ebp - 0x18], 8
lea eax, [ebp - 0x2c]
cmovae eax, dword [ebp - 0x2c]
movzx eax, word [eax]
mov dword [ebp - 0x44], eax
cmp eax, 0xe63e
jb 0x40a409
cmp eax, 0xe757
ja 0x40a415
mov ecx, dword [ebp - 0x48]
mov dword [ebp - 0x44], 0xff18
test ecx, ecx
je 0x40a3d3
push dword [ebp - 0x5c]
mov eax, dword [ebp - 0x50]
push 0xff18
movzx eax, word [eax]
push eax
mov eax, dword [ebp - 0x54]
add eax, 0x1c
push eax
call fcn.00436600
mov edx, eax
test edx, edx
jne 0x40a3e9
lea eax, [ebp - 0x40]
mov ecx, esi
push eax
push 0xff18
push dword [ebp - 0x60]
call fcn.00437ce0
lea edx, [ebp - 0x40]
movzx eax, word [edx + 0x10]
mov ecx, eax
mov dword [ebp - 0x48], ecx
lea ecx, [edi + 4]
test ax, ax
je 0x40a48e
cwde
mov dword [edi], eax
mov eax, dword [esi + 0x64]
jmp 0x40a497
cmp eax, 0x20
je 0x40a467
cmp eax, 0x3000
je 0x40a467
mov ecx, dword [ebp - 0x48]
test ecx, ecx
je 0x40a43c
push dword [ebp - 0x5c]
push eax
mov eax, dword [ebp - 0x50]
movzx eax, word [eax]
push eax
mov eax, dword [ebp - 0x54]
add eax, 0x1c
push eax
call fcn.00436600
mov edx, eax
test edx, edx
jne 0x40a44e
mov eax, dword [ebp - 0x44]
lea ecx, [ebp - 0x40]
push ecx
push eax
push dword [ebp - 0x60]
mov ecx, esi
call fcn.00437ce0
lea edx, [ebp - 0x40]
movzx eax, word [edx + 0x10]
mov ecx, eax
mov dword [ebp - 0x48], ecx
lea ecx, [edi + 4]
test ax, ax
je 0x40a48e
cwde
mov dword [edi], eax
mov eax, dword [esi + 0x64]
jmp 0x40a497
mov ecx, dword [ebp - 0x48]
test ecx, ecx
je 0x40a43c
push dword [ebp - 0x5c]
push eax
mov eax, dword [ebp - 0x50]
movzx eax, word [eax]
push eax
mov eax, dword [ebp - 0x54]
add eax, 0x1c
push eax
push edi
push dword [ebp - 0x60]
call fcn.00436760
lea ecx, [edi + 4]
jmp 0x40a499
mov eax, dword [esi + 0x64]
mov dword [edi], eax
movsx eax, word [edx + 0x12]
mov dword [ecx], eax
mov eax, dword [esi + 0x68]
mov edx, dword [ebp - 0x74]
mov dword [edx], eax
mov eax, dword [ebx + 0x38]
add eax, eax
add dword [ecx], eax
mov ecx, dword [ebp - 0x70]
add dword [edi], eax
cmp dword [ebx + 0x3c], 0
mov eax, dword [esi + 0x6c]
mov dword [ecx], eax
je 0x40a4bc
xor ecx, ecx
jmp 0x40a524
mov ecx, dword [0x5e46b8]
xor eax, eax
mov edx, dword [0x5e46b4]
sub ecx, edx
mov edi, dword [ebp - 0x44]
sar ecx, 1
test ecx, ecx
jle 0x40a4f5
movzx esi, di
mov dword [ebp - 0x70], esi
nop dword [eax + eax]
mov esi, dword [ebp - 0x70]
cmp word [edx + eax*2], si
mov esi, dword [ebp - 0x6c]
je 0x40a5a1
inc eax
cmp eax, ecx
jl 0x40a4e0
mov ecx, dword [0x5e46ac]
xor eax, eax
mov edx, dword [0x5e46a8]
sub ecx, edx
sar ecx, 1
test ecx, ecx
jle 0x40a51f
movzx edi, di
nop
cmp word [edx + eax*2], di
je 0x40a5b7
inc eax
cmp eax, ecx
jl 0x40a510
xor eax, eax
movzx ecx, ax
mov eax, dword [ebp - 0x68]
xor edx, edx
mov word [eax], cx
mov eax, dword [ebp - 0x4c]
mov ecx, dword [eax + 0x18]
mov eax, dword [eax + 0x1c]
sub eax, ecx
sar eax, 2
test eax, eax
je 0x40a56d
mov esi, eax
mov eax, dword [ecx + edx*4]
mov edi, dword [eax]
cmp dword [ebp - 0x64], edi
jl 0x40a565
mov eax, dword [eax + 4]
add eax, edi
cmp dword [ebp - 0x64], eax
jge 0x40a565
mov eax, dword [ebp - 0x68]
mov ecx, 3
mov word [eax], cx
mov eax, dword [ebp - 0x4c]
mov ecx, dword [eax + 0x18]
inc edx
cmp edx, esi
jb 0x40a540
mov esi, dword [ebp - 0x6c]
cmp dword [ebp - 0x58], 0
je 0x40a593
test esi, esi
je 0x40a593
mov eax, dword [esi + 4]
test eax, eax
je 0x40a585
push eax
call dword [sym.imp.GDI32.dll_DeleteObject]
push 0xa0
push esi
call fcn.0052d747
add esp, 8
lea ecx, [ebp - 0x2c]
xor esi, esi
call fcn.00403990
mov eax, esi
jmp 0x40a5cf
cmp eax, 0xffffffff
je 0x40a4f5
mov eax, dword [ebp - 0x68]
mov ecx, 1
mov word [eax], cx
jmp 0x40a56d
cmp eax, 0xffffffff
je 0x40a51f
mov eax, dword [ebp - 0x68]
mov ecx, 2
mov word [eax], cx
jmp 0x40a56d
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0052d3c5
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret 0x38
call fcn.00405980
int3