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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4d47a9
mov eax, dword fs:[0]
push eax
sub esp, 0x718
mov eax, dword [0x6306b0]
xor eax, esp
mov dword [esp + 0x710], eax
push ebx
push esi
push edi
mov eax, dword [0x6306b0]
xor eax, esp
push eax
lea eax, [esp + 0x728]
mov dword fs:[0], eax
mov esi, ecx
mov dword [esp + 0x54], esi
call fcn.004ada57
mov eax, dword [esi + 0x20]
xor edi, edi
push edi
push eax
call dword [sym.imp.USER32.dll_GetSystemMenu]
push eax
call fcn.004ae0dd
cmp eax, edi
je 0x40a192
mov ecx, dword [eax + 4]
push edi
push 0xf060
push ecx
call dword [sym.imp.USER32.dll_RemoveMenu]
call fcn.004a523f
xor ecx, ecx
cmp eax, edi
setne cl
cmp ecx, edi
jne 0x40a1ac
push 0x80004005
call fcn.00403520
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x14], eax
mov dword [esp + 0x730], edi
call fcn.004a523f
xor ecx, ecx
cmp eax, edi
setne cl
cmp ecx, edi
jne 0x40a1dd
push 0x80004005
call fcn.00403520
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 + 0x730], 1
call fcn.004a523f
xor ecx, ecx
cmp eax, edi
setne cl
cmp ecx, edi
jne 0x40a20f
push 0x80004005
call fcn.00403520
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 + 0x730], 2
call fcn.004a523f
xor ecx, ecx
cmp eax, edi
setne cl
cmp ecx, edi
jne 0x40a241
push 0x80004005
call fcn.00403520
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 + 0x730], 3
call fcn.004a523f
xor ecx, ecx
cmp eax, edi
setne cl
cmp ecx, edi
jne 0x40a273
push 0x80004005
call fcn.00403520
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 + 0x734], 4
call fcn.004aca11
push 0x7f03
push edi
mov esi, eax
call dword [sym.imp.USER32.dll_LoadIconW]
mov ecx, dword [esi + 0x20]
push edi
push eax
push 0x170
push ecx
call dword [sym.imp.USER32.dll_SendMessageW]
push 0x458
call fcn.004a5213
cmp eax, edi
je 0x40a2d3
push 0x458
push eax
lea ecx, [esp + 0x44]
call fcn.00405690
push 0x459
call fcn.004a5213
cmp eax, edi
je 0x40a2f0
push 0x459
push eax
lea ecx, [esp + 0x50]
call fcn.00405690
push 0x45a
call fcn.004a5213
cmp eax, edi
je 0x40a30d
push 0x45a
push eax
lea ecx, [esp + 0x48]
call fcn.00405690
push 0x45b
call fcn.004a5213
cmp eax, edi
je 0x40a32a
push 0x45b
push eax
lea ecx, [esp + 0x4c]
call fcn.00405690
lea ecx, [esp + 0x30]
call fcn.00409030
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 + 0x1c], edi
mov dword [esp + 0x20], edi
mov dword [esp + 0x24], edi
mov ecx, 0x631bd8
mov byte [esp + 0x730], 6
call fcn.00403bb0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0x20]
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 0x40aa39
xor esi, esi
push esi
mov edi, 7
push 0x562d4c
lea ecx, [esp + 0x100]
mov dword [esp + 0x118], edi
mov dword [esp + 0x114], esi
mov word [esp + 0x104], si
call fcn.00403330
push esi
push 0x562d4c
lea ecx, [esp + 0x68]
mov byte [esp + 0x738], 7
mov dword [esp + 0x80], edi
mov dword [esp + 0x7c], esi
mov word [esp + 0x6c], si
call fcn.00403330
mov dword [esp + 0x94], edi
mov dword [esp + 0x90], esi
mov word [esp + 0x80], si
mov dword [esp + 0xb0], edi
mov dword [esp + 0xac], esi
mov word [esp + 0x9c], si
mov dword [esp + 0xd4], edi
mov dword [esp + 0xd0], esi
mov word [esp + 0xc0], si
mov ecx, dword [esp + 0x54]
push 0xbb8
mov byte [esp + 0x734], 9
call fcn.004aca11
mov dword [esp + 0x10], 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 0x40a467
lea ecx, [esp + 0x30]
cmp edi, ecx
je 0x40a46c
call fcn.004b5f27
cmp esi, ebx
je 0x40a888
test edi, edi
jne 0x40a47d
call fcn.004b5f27
cmp esi, dword [edi + 4]
jne 0x40a487
call fcn.004b5f27
push 0xffffffffffffffff
lea eax, [esi + 0xc]
push 0
push eax
lea ecx, [esp + 0x6c]
call fcn.00403240
cmp esi, dword [edi + 4]
jne 0x40a4a2
call fcn.004b5f27
push 0xffffffffffffffff
push 0
add esi, 0x28
push esi
lea ecx, [esp + 0x88]
call fcn.00403240
push 0xffffffffffffffff
push 0
lea edx, [esi + 0x1c]
push edx
lea ecx, [esp + 0xa4]
call fcn.00403240
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.00403240
cmp dword [esp + 0xb4], 0
jne 0x40a872
mov eax, dword [esp + 0x64]
mov esi, 8
cmp dword [esp + 0x78], esi
jae 0x40a513
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.00405230
test eax, eax
je 0x40a5cc
cmp dword [esp + 0x78], esi
mov eax, dword [esp + 0x64]
jae 0x40a545
lea eax, [esp + 0x64]
push eax
lea ecx, [esp + 0x18]
push 0x455
push ecx
call fcn.004059d0
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x1c]
mov ecx, dword [eax + 0x20]
add esp, 0xc
push edx
push 0
push 0x180
push ecx
call dword [sym.imp.USER32.dll_SendMessageW]
push 0xffffffffffffffff
push 0
lea edx, [esp + 0x68]
push edx
lea ecx, [esp + 0x104]
call fcn.00403240
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x1c]
cmp ecx, eax
mov esi, eax
jbe 0x40a5a2
call fcn.004b5f27
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x1c]
cmp ecx, eax
lea edi, [esp + 0x18]
mov ebx, ecx
jbe 0x40a5b1
call fcn.004b5f27
push esi
push edi
push ebx
lea eax, [esp + 0x24]
push eax
lea eax, [esp + 0x68]
push eax
lea ecx, [esp + 0x2c]
call fcn.00409560
jmp 0x40a767
mov esi, dword [esp + 0x1c]
cmp esi, dword [esp + 0x20]
jbe 0x40a5db
call fcn.004b5f27
lea eax, [esp + 0x18]
mov dword [esp + 0x28], eax
mov ebx, esi
mov edi, dword [esp + 0x20]
cmp dword [esp + 0x1c], edi
mov dword [esp + 0x2c], ebx
jbe 0x40a5f8
call fcn.004b5f27
mov eax, dword [esp + 0x28]
test eax, eax
je 0x40a608
lea ecx, [esp + 0x18]
cmp eax, ecx
je 0x40a60d
call fcn.004b5f27
cmp ebx, edi
je 0x40a73b
cmp dword [esp + 0x28], 0
jne 0x40a621
call fcn.004b5f27
mov edx, dword [esp + 0x28]
cmp ebx, dword [edx + 8]
jb 0x40a62f
call fcn.004b5f27
xor eax, eax
push 0xffffffffffffffff
push eax
push ebx
lea ecx, [esp + 0xe8]
mov dword [esp + 0x100], 7
mov dword [esp + 0xfc], eax
mov word [esp + 0xec], ax
call fcn.00403240
cmp dword [esp + 0x94], 8
mov eax, dword [esp + 0x80]
jae 0x40a673
lea eax, [esp + 0x80]
mov edi, dword [esp + 0xf0]
mov esi, dword [esp + 0x90]
cmp edi, esi
mov edx, edi
jb 0x40a689
mov edx, esi
cmp dword [esp + 0xf4], 8
mov ecx, dword [esp + 0xe0]
jae 0x40a6a1
lea ecx, [esp + 0xe0]
test edx, edx
jbe 0x40a6bc
mov bx, word [ecx]
cmp bx, word [eax]
jne 0x40a703
add ecx, 2
add eax, 2
sub edx, 1
jne 0x40a6a5
mov ebx, dword [esp + 0x2c]
cmp edi, esi
jb 0x40a6cb
xor eax, eax
cmp edi, esi
setne al
test eax, eax
je 0x40a719
cmp dword [esp + 0xf4], 8
mov byte [esp + 0x730], 9
jb 0x40a6ed
mov edx, dword [esp + 0xe0]
push edx
call fcn.004a37b7
add esp, 4
mov eax, dword [esp + 0x28]
cmp ebx, dword [eax + 8]
jb 0x40a6fb
call fcn.004b5f27
add ebx, 0x1c
jmp 0x40a5e5
mov cx, bx
cmp cx, word [eax]
sbb eax, eax
and eax, 0xfffffffe
add eax, 1
je 0x40a6b8
mov ebx, dword [esp + 0x2c]
jmp 0x40a6c7
cmp dword [esp + 0xf4], 8
mov byte [esp + 0x730], 9
jb 0x40a73b
mov ecx, dword [esp + 0xe0]
push ecx
call fcn.004a37b7
add esp, 4
mov edi, dword [esp + 0x20]
cmp dword [esp + 0x1c], edi
jbe 0x40a74a
call fcn.004b5f27
mov eax, dword [esp + 0x28]
test eax, eax
je 0x40a75a
lea edx, [esp + 0x18]
cmp eax, edx
je 0x40a75f
call fcn.004b5f27
cmp ebx, edi
jne 0x40a872
lea eax, [esp + 0x7c]
push eax
lea ecx, [esp + 0x1c]
call fcn.0040a030
mov eax, dword [esp + 0x80]
mov edi, 8
cmp dword [esp + 0x94], edi
jae 0x40a791
lea eax, [esp + 0x80]
mov esi, dword [sym.imp.KERNEL32.dll_lstrcpyW]
push eax
lea ecx, [esp + 0x318]
push ecx
call esi
cmp dword [esp + 0xb0], edi
mov eax, dword [esp + 0x9c]
jae 0x40a7b9
lea eax, [esp + 0x9c]
push eax
lea edx, [esp + 0x118]
push edx
call esi
mov eax, dword [esp + 0x44]
push eax
lea ecx, [esp + 0x518]
push ecx
call esi
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenW]
lea edx, [esp + 0x314]
push edx
call edi
test eax, eax
lea eax, [esp + 0x114]
push eax
jne 0x40a80a
call edi
test eax, eax
lea edx, [esp + 0x314]
jne 0x40a802
mov ecx, dword [esp + 0x40]
jmp 0x40a81b
mov ecx, dword [esp + 0x3c]
push ecx
push edx
jmp 0x40a82c
call edi
test eax, eax
jne 0x40a82e
mov ecx, dword [esp + 0x48]
lea edx, [esp + 0x114]
push ecx
push edx
call esi
push 0x562d4c
lea eax, [esp + 0x518]
push eax
call esi
lea ecx, [esp + 0x114]
push ecx
lea edx, [esp + 0x518]
push edx
lea eax, [esp + 0x31c]
push eax
lea ecx, [esp + 0x20]
push 0x456
push ecx
call fcn.004059d0
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0x24]
mov ecx, dword [eax + 0x20]
add esp, 0x14
push edx
push 0
push 0x180
push ecx
call dword [sym.imp.USER32.dll_SendMessageW]
lea ecx, [esp + 0x4c]
call fcn.00408fb0
mov esi, dword [esp + 0x50]
mov edi, dword [esp + 0x4c]
jmp 0x40a457
mov edi, dword [esp + 0x10]
mov edx, dword [edi + 0x20]
push edx
xor ebx, ebx
call dword [sym.imp.USER32.dll_GetDC]
push eax
call fcn.004a73d6
push ebx
push ebx
mov esi, eax
mov eax, dword [edi + 0x20]
push 0x31
push eax
call dword [sym.imp.USER32.dll_SendMessageW]
push eax
call fcn.004a7569
mov edx, dword [esi]
push eax
mov eax, dword [edx + 0x28]
mov ecx, esi
call eax
mov ecx, dword [esp + 0x10]
mov edx, dword [ecx + 0x20]
xor edi, edi
push edi
push edi
push 0x18b
push edx
mov dword [esp + 0x38], eax
call dword [sym.imp.USER32.dll_SendMessageW]
test eax, eax
jle 0x40a92f
lea ecx, [ecx]
mov ecx, dword [esp + 0x10]
lea eax, [esp + 0x14]
push eax
push edi
call fcn.004ac9a3
mov eax, dword [esp + 0x14]
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_GetTextExtentPoint32W]
mov eax, dword [esp + 0x4c]
cmp ebx, eax
jge 0x40a911
mov ebx, eax
mov ecx, dword [esp + 0x10]
mov edx, dword [ecx + 0x20]
push 0
push 0
push 0x18b
push edx
add edi, 1
call dword [sym.imp.USER32.dll_SendMessageW]
cmp edi, eax
jl 0x40a8e0
mov eax, dword [esp + 0x10]
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_SendMessageW]
mov edx, dword [esi]
mov eax, dword [esp + 0x28]
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, 8
cmp dword [esp + 0xd4], esi
jb 0x40a987
mov eax, dword [esp + 0xc0]
push eax
call fcn.004a37b7
add esp, 4
cmp dword [esp + 0xb0], esi
mov ebx, 7
mov dword [esp + 0xd4], ebx
mov dword [esp + 0xd0], edi
mov word [esp + 0xc0], di
jb 0x40a9bb
mov ecx, dword [esp + 0x9c]
push ecx
call fcn.004a37b7
add esp, 4
cmp dword [esp + 0x94], esi
mov dword [esp + 0xb0], ebx
mov dword [esp + 0xac], edi
mov word [esp + 0x9c], di
jb 0x40a9ea
mov edx, dword [esp + 0x80]
push edx
call fcn.004a37b7
add esp, 4
cmp dword [esp + 0x78], esi
mov dword [esp + 0x94], ebx
mov dword [esp + 0x90], edi
mov word [esp + 0x80], di
jb 0x40aa13
mov eax, dword [esp + 0x64]
push eax
call fcn.004a37b7
add esp, 4
cmp dword [esp + 0x110], esi
mov dword [esp + 0x78], ebx
mov dword [esp + 0x74], edi
mov word [esp + 0x64], di
jb 0x40aa39
mov ecx, dword [esp + 0xfc]
push ecx
call fcn.004a37b7
add esp, 4
mov esi, dword [esp + 0x1c]
xor edi, edi
cmp esi, edi
je 0x40aa85
mov ebx, dword [esp + 0x20]
cmp esi, ebx
je 0x40aa7c
add esi, 0x18
mov edi, edi
cmp dword [esi], 8
jb 0x40aa61
mov eax, dword [esi - 0x14]
push eax
call fcn.004a37b7
add esp, 4
mov dword [esi], 7
mov dword [esi - 4], edi
mov word [esi - 0x14], di
add esi, 0x1c
lea edx, [esi - 0x18]
cmp edx, ebx
jne 0x40aa50
mov esi, dword [esp + 0x1c]
push esi
call fcn.004a37b7
add esp, 4
mov eax, dword [esp + 0x34]
push eax
lea ecx, [esp + 0x34]
push ecx
mov dword [esp + 0x24], edi
mov dword [esp + 0x28], edi
mov dword [esp + 0x2c], edi
mov edx, dword [eax]
push edx
mov esi, ecx
push esi
lea eax, [esp + 0x68]
push eax
mov byte [esp + 0x744], 4
call fcn.00409ea0
mov ecx, dword [esp + 0x34]
push ecx
call fcn.004a37b7
mov eax, dword [esp + 0x48]
add eax, 0xfffffff0
add esp, 4
mov dword [esp + 0x34], edi
mov dword [esp + 0x38], edi
mov byte [esp + 0x730], 3
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40aaf0
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 + 0x730], 2
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40ab18
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 + 0x730], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40ab40
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 + 0x730], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40ab68
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
mov dword [esp + 0x730], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40ab93
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 1
mov ecx, dword [esp + 0x728]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x710]
xor ecx, esp
call fcn.004b4b34
mov esp, ebp
pop ebp
ret