Function at 0x40a010
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4d60e9
mov eax, dword fs:[0]
push eax
sub esp, 0x418
mov eax, dword [0x630ddc]
xor eax, esp
mov dword [esp + 0x410], eax
push ebx
push esi
push edi
mov eax, dword [0x630ddc]
xor eax, esp
push eax
lea eax, [esp + 0x428]
mov dword fs:[0], eax
mov esi, ecx
mov dword [esp + 0x54], esi
call fcn.004af9b1
mov eax, dword [esi + 0x20]
xor edi, edi
push edi
push eax
call dword [sym.imp.USER32.dll_GetSystemMenu]
push eax
call fcn.004b0029
cmp eax, edi
je 0x40a082
mov ecx, dword [eax + 4]
push edi
push 0xf060
push ecx
call dword [sym.imp.USER32.dll_RemoveMenu]
call fcn.004a720f
xor ecx, ecx
cmp eax, edi
setne cl
cmp ecx, edi
jne 0x40a09c
push 0x80004005
call fcn.00401090
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x10], eax
mov dword [esp + 0x430], edi
call fcn.004a720f
xor ecx, ecx
cmp eax, edi
setne cl
cmp ecx, edi
jne 0x40a0cd
push 0x80004005
call fcn.00401090
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x3c], eax
mov byte [esp + 0x430], 1
call fcn.004a720f
xor ecx, ecx
cmp eax, edi
setne cl
cmp ecx, edi
jne 0x40a0ff
push 0x80004005
call fcn.00401090
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x48], eax
mov byte [esp + 0x430], 2
call fcn.004a720f
xor ecx, ecx
cmp eax, edi
setne cl
cmp ecx, edi
jne 0x40a131
push 0x80004005
call fcn.00401090
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x40], eax
mov byte [esp + 0x430], 3
call fcn.004a720f
xor ecx, ecx
cmp eax, edi
setne cl
cmp ecx, edi
jne 0x40a163
push 0x80004005
call fcn.00401090
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x44], eax
push 0xbbb
mov ecx, esi
mov byte [esp + 0x434], 4
call fcn.004ae95d
push 0x7f03
push edi
mov esi, eax
call dword [sym.imp.USER32.dll_LoadIconA]
mov ecx, dword [esi + 0x20]
push edi
push eax
push 0x170
push ecx
call dword [sym.imp.USER32.dll_SendMessageA]
push 0x458
call fcn.004a71e3
cmp eax, edi
je 0x40a1c3
push 0x458
push eax
lea ecx, [esp + 0x44]
call fcn.00405690
push 0x459
call fcn.004a71e3
cmp eax, edi
je 0x40a1e0
push 0x459
push eax
lea ecx, [esp + 0x50]
call fcn.00405690
push 0x45a
call fcn.004a71e3
cmp eax, edi
je 0x40a1fd
push 0x45a
push eax
lea ecx, [esp + 0x48]
call fcn.00405690
push 0x45b
call fcn.004a71e3
cmp eax, edi
je 0x40a21a
push 0x45b
push eax
lea ecx, [esp + 0x4c]
call fcn.00405690
lea ecx, [esp + 0x30]
call fcn.00408ec0
mov dword [esp + 0x34], eax
mov byte [eax + 0x85], 1
mov eax, dword [esp + 0x34]
mov dword [eax + 4], eax
mov eax, dword [esp + 0x34]
mov dword [eax], eax
mov eax, dword [esp + 0x34]
mov dword [eax + 8], eax
mov dword [esp + 0x38], edi
mov dword [esp + 0x24], edi
mov dword [esp + 0x28], edi
mov dword [esp + 0x2c], edi
mov ecx, 0x6322f8
mov byte [esp + 0x430], 6
call fcn.00403df0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0x24]
call eax
mov edx, dword [eax]
mov edx, dword [edx + 0x20]
lea ecx, [esp + 0x30]
push ecx
mov ecx, eax
call edx
test eax, eax
je 0x40a90f
xor edi, edi
push edi
mov esi, 0xf
push 0x56ab79
lea ecx, [esp + 0x100]
mov dword [esp + 0x118], esi
mov dword [esp + 0x114], edi
mov byte [esp + 0x104], 0
call fcn.004035e0
push edi
push 0x56ab79
lea ecx, [esp + 0x68]
mov byte [esp + 0x438], 7
mov dword [esp + 0x80], esi
mov dword [esp + 0x7c], edi
mov byte [esp + 0x6c], 0
call fcn.004035e0
mov dword [esp + 0x94], esi
mov dword [esp + 0x90], edi
mov byte [esp + 0x80], 0
mov dword [esp + 0xb0], esi
mov dword [esp + 0xac], edi
mov byte [esp + 0x9c], 0
mov dword [esp + 0xd4], esi
mov dword [esp + 0xd0], edi
mov byte [esp + 0xc0], 0
mov ecx, dword [esp + 0x54]
push 0xbb8
mov byte [esp + 0x434], 9
call fcn.004ae95d
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x34]
mov esi, dword [eax]
lea edi, [esp + 0x30]
mov dword [esp + 0x4c], edi
mov dword [esp + 0x50], esi
test edi, edi
mov ebx, dword [esp + 0x34]
je 0x40a357
lea ecx, [esp + 0x30]
cmp edi, ecx
je 0x40a35c
call fcn.004b83f7
cmp esi, ebx
je 0x40a761
test edi, edi
jne 0x40a36d
call fcn.004b83f7
cmp esi, dword [edi + 4]
jne 0x40a377
call fcn.004b83f7
push 0xffffffffffffffff
lea eax, [esi + 0xc]
push 0
push eax
lea ecx, [esp + 0x6c]
call fcn.00403500
cmp esi, dword [edi + 4]
jne 0x40a392
call fcn.004b83f7
push 0xffffffffffffffff
push 0
add esi, 0x28
push esi
lea ecx, [esp + 0x88]
call fcn.00403500
push 0xffffffffffffffff
push 0
lea edx, [esi + 0x1c]
push edx
lea ecx, [esp + 0xa4]
call fcn.00403500
mov eax, dword [esi + 0x38]
push 0xffffffffffffffff
mov dword [esp + 0xb8], eax
mov ecx, dword [esi + 0x3c]
push 0
mov dword [esp + 0xc0], ecx
add esi, 0x40
push esi
lea ecx, [esp + 0xc8]
call fcn.00403500
cmp dword [esp + 0xb4], 0
jne 0x40a74b
mov eax, dword [esp + 0x64]
mov esi, 0x10
cmp dword [esp + 0x78], esi
jae 0x40a403
lea eax, [esp + 0x64]
mov edx, dword [esp + 0x74]
push edx
push eax
mov eax, dword [esp + 0x114]
push eax
push 0
lea ecx, [esp + 0x108]
call fcn.00405430
test eax, eax
je 0x40a4bc
cmp dword [esp + 0x78], esi
mov eax, dword [esp + 0x64]
jae 0x40a435
lea eax, [esp + 0x64]
push eax
lea ecx, [esp + 0x14]
push 0x455
push ecx
call fcn.00405870
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x20]
mov ecx, dword [eax + 0x20]
add esp, 0xc
push edx
push 0
push 0x180
push ecx
call dword [sym.imp.USER32.dll_SendMessageA]
push 0xffffffffffffffff
push 0
lea edx, [esp + 0x68]
push edx
lea ecx, [esp + 0x104]
call fcn.00403500
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x24]
cmp ecx, eax
mov esi, eax
jbe 0x40a492
call fcn.004b83f7
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x24]
cmp ecx, eax
lea edi, [esp + 0x20]
mov ebx, ecx
jbe 0x40a4a1
call fcn.004b83f7
push esi
push edi
push ebx
lea eax, [esp + 0x2c]
push eax
lea eax, [esp + 0x68]
push eax
lea ecx, [esp + 0x34]
call fcn.004093f0
jmp 0x40a640
mov esi, dword [esp + 0x24]
cmp esi, dword [esp + 0x28]
jbe 0x40a4cb
call fcn.004b83f7
lea eax, [esp + 0x20]
mov edi, eax
mov dword [esp + 0x18], edi
mov dword [esp + 0x1c], esi
lea esp, [esp]
mov esi, dword [esp + 0x28]
cmp dword [esp + 0x24], esi
jbe 0x40a4ef
call fcn.004b83f7
test edi, edi
je 0x40a4fb
lea ecx, [esp + 0x20]
cmp edi, ecx
je 0x40a500
call fcn.004b83f7
cmp dword [esp + 0x1c], esi
je 0x40a612
mov edi, dword [esp + 0x18]
test edi, edi
jne 0x40a517
call fcn.004b83f7
mov esi, dword [esp + 0x1c]
cmp esi, dword [edi + 8]
jb 0x40a525
call fcn.004b83f7
push 0xffffffffffffffff
push 0
push esi
lea ecx, [esp + 0xe8]
mov dword [esp + 0x100], 0xf
mov dword [esp + 0xfc], 0
mov byte [esp + 0xec], 0
call fcn.00403500
cmp dword [esp + 0x94], 0x10
mov edx, dword [esp + 0x80]
jae 0x40a56c
lea edx, [esp + 0x80]
mov edi, dword [esp + 0xf0]
mov esi, dword [esp + 0x90]
cmp edi, esi
mov ecx, edi
jb 0x40a582
mov ecx, esi
mov ebx, dword [esp + 0xf4]
cmp ebx, 0x10
mov eax, dword [esp + 0xe0]
jae 0x40a59c
lea eax, [esp + 0xe0]
push ecx
push edx
push eax
call fcn.004037f0
add esp, 0xc
test eax, eax
jne 0x40a5b8
cmp edi, esi
jb 0x40a5b8
cmp edi, esi
setne al
test eax, eax
je 0x40a5f5
cmp ebx, 0x10
mov byte [esp + 0x430], 9
jb 0x40a5d5
mov edx, dword [esp + 0xe0]
push edx
call fcn.004a5792
add esp, 4
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
cmp ecx, dword [eax + 8]
jb 0x40a5e7
call fcn.004b83f7
add dword [esp + 0x1c], 0x1c
mov edi, dword [esp + 0x18]
jmp 0x40a4e0
cmp ebx, 0x10
mov byte [esp + 0x430], 9
jb 0x40a612
mov edx, dword [esp + 0xe0]
push edx
call fcn.004a5792
add esp, 4
mov esi, dword [esp + 0x28]
cmp dword [esp + 0x24], esi
jbe 0x40a621
call fcn.004b83f7
mov eax, dword [esp + 0x18]
test eax, eax
je 0x40a631
lea ecx, [esp + 0x20]
cmp eax, ecx
je 0x40a636
call fcn.004b83f7
cmp dword [esp + 0x1c], esi
jne 0x40a74b
lea edx, [esp + 0x7c]
push edx
lea ecx, [esp + 0x24]
call fcn.00409f20
mov eax, dword [esp + 0x80]
mov edi, 0x10
cmp dword [esp + 0x94], edi
jae 0x40a66a
lea eax, [esp + 0x80]
mov esi, dword [sym.imp.KERNEL32.dll_lstrcpyA]
push eax
lea eax, [esp + 0x218]
push eax
call esi
cmp dword [esp + 0xb0], edi
mov eax, dword [esp + 0x9c]
jae 0x40a692
lea eax, [esp + 0x9c]
push eax
lea ecx, [esp + 0x118]
push ecx
call esi
mov edx, dword [esp + 0x44]
push edx
lea eax, [esp + 0x318]
push eax
call esi
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenA]
lea ecx, [esp + 0x214]
push ecx
call edi
test eax, eax
lea edx, [esp + 0x114]
push edx
jne 0x40a6e3
call edi
test eax, eax
lea ecx, [esp + 0x214]
jne 0x40a6db
mov eax, dword [esp + 0x40]
jmp 0x40a6f4
mov eax, dword [esp + 0x3c]
push eax
push ecx
jmp 0x40a705
call edi
test eax, eax
jne 0x40a707
mov eax, dword [esp + 0x48]
lea ecx, [esp + 0x114]
push eax
push ecx
call esi
push 0x56ab79
lea edx, [esp + 0x318]
push edx
call esi
lea eax, [esp + 0x114]
push eax
lea ecx, [esp + 0x318]
push ecx
lea edx, [esp + 0x21c]
push edx
lea eax, [esp + 0x1c]
push 0x456
push eax
call fcn.00405870
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x28]
mov eax, dword [edx + 0x20]
add esp, 0x14
push ecx
push 0
push 0x180
push eax
call dword [sym.imp.USER32.dll_SendMessageA]
lea ecx, [esp + 0x4c]
call fcn.00408e40
mov esi, dword [esp + 0x50]
mov edi, dword [esp + 0x4c]
jmp 0x40a347
mov edi, dword [esp + 0x14]
mov ecx, dword [edi + 0x20]
push ecx
xor ebx, ebx
call dword [sym.imp.USER32.dll_GetDC]
push eax
call fcn.004a9349
mov edx, dword [edi + 0x20]
push ebx
push ebx
push 0x31
push edx
mov esi, eax
call dword [sym.imp.USER32.dll_SendMessageA]
push eax
call fcn.004a94dc
mov edx, dword [esi]
push eax
mov eax, dword [edx + 0x28]
mov ecx, esi
call eax
mov ecx, dword [esp + 0x14]
mov edx, dword [ecx + 0x20]
xor edi, edi
push edi
push edi
push 0x18b
push edx
mov dword [esp + 0x28], eax
call dword [sym.imp.USER32.dll_SendMessageA]
test eax, eax
jle 0x40a805
mov ecx, dword [esp + 0x14]
lea eax, [esp + 0x10]
push eax
push edi
call fcn.004ae8ef
mov eax, dword [esp + 0x10]
mov ecx, dword [eax - 0xc]
lea edx, [esp + 0x4c]
push edx
push ecx
push eax
mov eax, dword [esi + 8]
push eax
call dword [sym.imp.GDI32.dll_GetTextExtentPoint32A]
mov eax, dword [esp + 0x4c]
cmp ebx, eax
jge 0x40a7e7
mov ebx, eax
mov ecx, dword [esp + 0x14]
mov edx, dword [ecx + 0x20]
push 0
push 0
push 0x18b
push edx
add edi, 1
call dword [sym.imp.USER32.dll_SendMessageA]
cmp edi, eax
jl 0x40a7b6
mov eax, dword [esp + 0x14]
mov ecx, dword [eax + 0x20]
xor edi, edi
push edi
add ebx, 4
push ebx
push 0x194
push ecx
call dword [sym.imp.USER32.dll_SendMessageA]
mov edx, dword [esi]
mov eax, dword [esp + 0x18]
mov edx, dword [edx + 0x28]
push eax
mov ecx, esi
call edx
mov eax, dword [esi + 4]
mov ecx, dword [esp + 0x54]
mov edx, dword [ecx + 0x20]
push eax
push edx
call dword [sym.imp.USER32.dll_ReleaseDC]
mov esi, 0x10
cmp dword [esp + 0xd4], esi
jb 0x40a85d
mov eax, dword [esp + 0xc0]
push eax
call fcn.004a5792
add esp, 4
cmp dword [esp + 0xb0], esi
mov ebx, 0xf
mov dword [esp + 0xd4], ebx
mov dword [esp + 0xd0], edi
mov byte [esp + 0xc0], 0
jb 0x40a891
mov ecx, dword [esp + 0x9c]
push ecx
call fcn.004a5792
add esp, 4
cmp dword [esp + 0x94], esi
mov dword [esp + 0xb0], ebx
mov dword [esp + 0xac], edi
mov byte [esp + 0x9c], 0
jb 0x40a8c0
mov edx, dword [esp + 0x80]
push edx
call fcn.004a5792
add esp, 4
cmp dword [esp + 0x78], esi
mov dword [esp + 0x94], ebx
mov dword [esp + 0x90], edi
mov byte [esp + 0x80], 0
jb 0x40a8e9
mov eax, dword [esp + 0x64]
push eax
call fcn.004a5792
add esp, 4
cmp dword [esp + 0x110], esi
mov dword [esp + 0x78], ebx
mov dword [esp + 0x74], edi
mov byte [esp + 0x64], 0
jb 0x40a90f
mov ecx, dword [esp + 0xfc]
push ecx
call fcn.004a5792
add esp, 4
mov esi, dword [esp + 0x24]
xor edi, edi
cmp esi, edi
je 0x40a959
mov ebx, dword [esp + 0x28]
cmp esi, ebx
je 0x40a950
add esi, 0x18
cmp dword [esi], 0x10
jb 0x40a935
mov eax, dword [esi - 0x14]
push eax
call fcn.004a5792
add esp, 4
mov dword [esi], 0xf
mov dword [esi - 4], edi
mov byte [esi - 0x14], 0
add esi, 0x1c
lea edx, [esi - 0x18]
cmp edx, ebx
jne 0x40a924
mov esi, dword [esp + 0x24]
push esi
call fcn.004a5792
add esp, 4
mov eax, dword [esp + 0x34]
push eax
lea ecx, [esp + 0x34]
push ecx
mov dword [esp + 0x2c], edi
mov dword [esp + 0x30], edi
mov dword [esp + 0x34], edi
mov edx, dword [eax]
push edx
mov esi, ecx
push esi
lea eax, [esp + 0x68]
push eax
mov byte [esp + 0x444], 4
call fcn.00409d90
mov ecx, dword [esp + 0x34]
push ecx
call fcn.004a5792
mov eax, dword [esp + 0x48]
add eax, 0xfffffff0
add esp, 4
mov dword [esp + 0x34], edi
mov dword [esp + 0x38], edi
mov byte [esp + 0x430], 3
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40a9c4
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x40]
add eax, 0xfffffff0
mov byte [esp + 0x430], 2
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40a9ec
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x48]
add eax, 0xfffffff0
mov byte [esp + 0x430], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40aa14
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x3c]
add eax, 0xfffffff0
mov byte [esp + 0x430], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40aa3c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
mov dword [esp + 0x430], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40aa67
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 1
mov ecx, dword [esp + 0x428]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x410]
xor ecx, esp
call fcn.004b6bdf
mov esp, ebp
pop ebp
ret