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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xec
push ebx
mov ebx, ecx
push esi
mov eax, dword [ebx + 0xec]
push edi
mov dword [esp + 0x4c], ebx
cmp eax, 0xf3c
jge 0x475a07
inc eax
mov dword [ebx + 0xec], eax
cmp eax, 1
je 0x40e670
cmp byte [ebx + 0x100], 0
mov byte [ebx + 0x148], 0
jne 0x40e4e7
mov esi, dword [sym.imp.USER32.dll_PeekMessageW]
cmp byte [ebx + 0x148], 0
mov edx, 2
jne 0x40e4e7
cmp byte [0x4c10b7], 0
jne 0x475a22
cmp byte [0x4c1848], 0
jne 0x475a34
push 1
push 0
push 0
push 0
lea eax, [esp + 0x60]
push eax
call esi
test eax, eax
jne 0x40e610
cmp byte [0x4c10c0], 1
je 0x475a5c
cmp dword [ebx + 0xfc], 1
je 0x476288
mov edx, 2
cmp dword [0x4c1104], 0
jne 0x475a79
cmp byte [0x4c10c5], 1
je 0x475b06
cmp dword [ebx + 0x480], 0
je 0x40e324
cmp byte [0x4c2360], 0
jne 0x40e324
mov esi, dword [ebx + 0x478]
lea eax, [ebx + 0x478]
mov byte [0x4c2360], 1
mov dword [esp + 0x1c], 0
mov dword [esp + 0x10], eax
lea ecx, [ecx]
test esi, esi
jne 0x40e50f
mov ebx, dword [esp + 0x10]
lea esp, [esp]
mov eax, dword [ebx]
mov dword [esp + 0x10], eax
test eax, eax
jne 0x40e558
mov ebx, dword [esp + 0x4c]
mov byte [0x4c2360], al
cmp dword [esp + 0x1c], eax
jg case.default.0x476041
lea edx, [eax + 2]
cmp byte [0x4c181c], 0
je 0x40e3d7
cmp byte [ebx + 0x484], 1
je 0x40e3d7
cmp byte [0x4c1848], 1
je 0x40e3d7
xor ecx, ecx
mov eax, 8
mul edx
seto cl
mov dword [esp + 0x58], 0
mov dword [esp + 0x5c], 8
neg ecx
or ecx, eax
push ecx
call fcn.0042010a
add esp, 4
xor ecx, ecx
push 4
mov dword [esp + 0x58], eax
mov word [eax], cx
call fcn.0042010a
add esp, 4
test eax, eax
je 0x40e706
mov dword [eax], 1
mov dword [esp + 0x60], eax
lea esp, [esp]
cmp dword [0x4c183c], 0
jne 0x475b42
cmp byte [0x4c181c], 0
je 0x475cc5
mov esi, dword [esp + 0x60]
dec dword [esi]
jne 0x40e3d7
push dword [esp + 0x54]
call fcn.0042017e
add esp, 4
push esi
call fcn.0042017e
add esp, 4
mov ecx, ebx
call fcn.0040e7b0
cmp al, 1
je case.default.0x476041
cmp byte [0x4c1990], 0
jne 0x475cf7
mov eax, dword [ebx + 0xfc]
cmp eax, 7
je 0x475dfc
cmp eax, 8
je 0x476147
cmp eax, 9
je 0x476147
cmp eax, 2
je 0x475feb
cmp eax, 3
je 0x475feb
cmp eax, 4
je 0x475feb
cmp eax, 5
je 0x475feb
cmp eax, 6
je 0x475feb
mov eax, dword [ebp + 8]
mov dword [ebx + 0xf4], eax
mov esi, eax
inc eax
mov dword [ebp + 8], eax
cmp esi, dword [0x4c22f8]
jg 0x475fdc
test esi, esi
jle 0x475fdc
shl esi, 4
add esi, dword [0x4c232c]
je 0x475fdc
mov eax, dword [esi + 4]
xor edx, edx
mov ecx, 1
mov dword [esp + 0x20], edx
mov dword [esp + 0x28], edx
mov dword [esp + 0x2c], ecx
mov edi, dword [eax]
mov dword [esp + 0x1c], edx
movsx eax, word [edi + 8]
test eax, eax
jne 0x40e56c
lea eax, [ebp + 8]
push eax
push esi
mov ecx, ebx
call fcn.0040e7e0
mov esi, dword [esp + 0x28]
test esi, esi
jne 0x40e5e7
mov edx, dword [esp + 0x20]
mov ecx, dword [esp + 0x2c]
cmp ecx, 5
jge 0x475f2b
mov dword [esp + 0x2c], 1
mov dword [esp + 0x20], 0
mov esi, dword [sym.imp.USER32.dll_PeekMessageW]
cmp byte [ebx + 0x100], 0
je 0x40e240
mov eax, dword [ebx + 0xec]
mov byte [ebx + 0x148], 0
cmp eax, 1
je 0x40e67a
dec eax
mov dword [ebx + 0xec], eax
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov edi, dword [esi]
cmp byte [edi + 0x11], 0
jne 0x40e550
mov edi, dword [edi + 0x14]
call dword [sym.imp.WINMM.dll_timeGetTime]
mov ecx, eax
sub eax, edi
xor edx, edx
cmp edi, 0x7fffffff
ja 0x475b20
cmp ecx, 0x7fffffff
ja 0x40e53b
cdq
mov edi, dword [esi]
test edx, edx
jl 0x40e550
jg 0x40e6cc
cmp eax, dword [edi + 0x18]
jae 0x40e6cc
mov esi, dword [esi + 4]
jmp 0x40e2f0
mov ecx, dword [eax]
cmp byte [ecx + 0x11], 0
jne 0x475b31
mov eax, dword [eax + 4]
jmp 0x40e302
cmp eax, 0x33
jne 0x40e57e
push esi
mov ecx, ebx
call fcn.0040ea00
jmp 0x40e4a7
dec eax
cmp eax, 0x7e
ja case.0x40e58f.2
movzx eax, byte [eax + 0x40e724]
jmp dword [eax*4 + 0x40e710]
lea eax, [esp + 0x20]
push eax
lea eax, [esp + 0x20]
push eax
push esi
push 0
mov ecx, ebx
call fcn.004144e0
test eax, eax
js 0x40e4a7
mov ecx, dword [esi + 4]
mov eax, dword [esp + 0x1c]
mov eax, dword [ecx + eax*4]
cmp word [eax + 8], 0x7f
je 0x40e4a7
jmp 0x475ef5
lea eax, [esp + 0x4b]
push eax
lea eax, [esp + 0x24]
push eax
lea eax, [esp + 0x24]
push eax
push esi
push 0
mov ecx, ebx
call fcn.00413680
jmp 0x40e5aa
mov eax, dword [esi + 0xc]
dec dword [eax]
mov eax, dword [esi + 0xc]
cmp dword [eax], 0
je 0x475f11
push esi
call fcn.0042017e
add esp, 4
mov dword [esp + 0x28], 0
jmp 0x40e4b3
cmp dword [esp + 0x54], 0x12
je 0x475a46
lea eax, [esp + 0x50]
push eax
mov ecx, 0x4c1810
call fcn.0041f381
test eax, eax
jne 0x40e657
lea eax, [esp + 0x50]
push eax
mov ecx, 0x4c1810
call fcn.0041ed1a
test eax, eax
jne 0x40e657
lea eax, [esp + 0x50]
push eax
call dword [sym.imp.USER32.dll_TranslateMessage]
lea eax, [esp + 0x50]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageW]
push 1
push 0
push 0
push 0
lea eax, [esp + 0x60]
push eax
call esi
test eax, eax
je 0x40e283
jmp 0x40e610
call fcn.0041ecee
jmp 0x40e226
mov ecx, ebx
call fcn.0040322e
cmp byte [ebx + 0x100], 1
je 0x40e504
mov ecx, ebx
call fcn.0041ec33
push 0
call dword [sym.imp.USER32.dll_LockWindowUpdate]
push dword [0x4c10e8]
call dword [sym.imp.USER32.dll_DestroyWindow]
mov esi, dword [sym.imp.USER32.dll_GetMessageW]
push 0
push 0
push 0
lea eax, [esp + 0xe8]
push eax
call esi
test eax, eax
jle 0x40e504
jmp 0x4762a7
inc dword [esp + 0x1c]
call dword [sym.imp.WINMM.dll_timeGetTime]
mov dword [edi + 0x14], eax
push dword [esi]
mov ecx, ebx
call fcn.0041cf79
mov ecx, dword [esi]
push 0
mov byte [ecx + 0x10], 1
mov eax, dword [eax + 0x10]
push 1
inc eax
push eax
mov ecx, ebx
call section..text
mov eax, dword [esi]
mov byte [eax + 0x10], 0
mov esi, dword [esi + 4]
jmp 0x40e2f0
xor eax, eax
jmp 0x40e395
push 0xffffffffffffffff
push 0x9a
mov byte [0x4c10b6], 0
call fcn.0044d520
or eax, 0xffffffff
jmp 0x40e506
cmp byte [ebx + 0x149], 0
je 0x40e2a2
jmp 0x40e25f
cmp dword [ebx + 0xfc], 0
je 0x40e2a2
jmp 0x40e26c
mov byte [ebx + 0x100], 1
mov dword [ebx + 0xfc], 1
jmp 0x40e283
mov byte [0x4c10c5], 0
mov byte [0x4c10c0], 0
mov dword [ebx + 0xfc], 1
jmp 0x40e290
mov eax, dword [0x4c1108]
mov esi, dword [eax]
call fcn.0044d869
mov edx, dword [ebx + 0x1cc]
xor edi, edi
test edx, edx
je 0x475aab
mov ecx, dword [ebx + 0x1c8]
mov eax, dword [ecx]
mov eax, dword [eax]
test eax, eax
je 0x475aa3
cmp dword [eax], esi
je 0x475aab
inc edi
add ecx, 4
cmp edi, edx
jb 0x475a97
cmp edi, edx
je 0x475af6
mov eax, dword [ebx + 0x1c8]
mov ecx, ebx
mov eax, dword [eax + edi*4]
mov eax, dword [eax]
add eax, 8
push eax
call fcn.0041cf79
mov ecx, dword [ebx + 0x1c8]
mov esi, eax
mov ecx, dword [ecx + edi*4]
mov ecx, dword [ecx]
add ecx, 0x18
push ecx
lea ecx, [ebx + 0x150]
call fcn.0040c935
mov eax, dword [esi + 0x10]
push 0
push 1
inc eax
push eax
mov ecx, ebx
call section..text
jmp case.default.0x476041
mov esi, dword [sym.imp.USER32.dll_PeekMessageW]
mov edx, 2
jmp 0x40e2af
cmp byte [0x4c10b7], 0
jne 0x40e2bc
push 0xa
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x40e4da
cmp ecx, 0x7fffffff
jbe 0x40e53b
jmp 0x40e53a
lea eax, [esp + 0x10]
push eax
mov ecx, ebx
call fcn.0044d8e9
jmp 0x40e300
mov eax, dword [0x4c1840]
lea ecx, [esp + 0x50]
mov esi, dword [eax]
push esi
call fcn.00468b20
mov ecx, 0x4c183c
call fcn.00446417
test esi, esi
je 0x475b69
push ecx
mov ecx, esi
call fcn.00468ba4
cmp dword [esp + 0x58], 0
mov dword [0x4c2364], 0
je 0x40e3a0
lea eax, [esp + 0x54]
push eax
mov ecx, ebx
call fcn.0041cf79
mov esi, eax
test esi, esi
je 0x40e3a0
lea ecx, [esp + 0x30]
mov dword [esp + 0x30], 0
mov dword [esp + 0x38], 0
mov dword [esp + 0x3c], 1
call fcn.00412570
mov eax, dword [esp + 0x50]
push str._GUI_CTRLID
lea ecx, [esp + 0xd0]
mov dword [esp + 0x40], 1
mov dword [esp + 0x34], eax
call fcn.0040caee
push 2
push 1
lea eax, [esp + 0x38]
push eax
lea eax, [esp + 0xd8]
push eax
call fcn.0040d380
lea ecx, [esp + 0xcc]
call fcn.00405cd3
lea ecx, [esp + 0x30]
call fcn.00412570
mov eax, dword [esp + 0x64]
push str._GUI_WINHANDLE
lea ecx, [esp + 0xc0]
mov dword [esp + 0x40], 7
mov dword [esp + 0x34], eax
call fcn.0040caee
push 2
push 1
lea eax, [esp + 0x38]
push eax
lea eax, [esp + 0xc8]
push eax
call fcn.0040d380
lea ecx, [esp + 0xbc]
call fcn.00405cd3
lea ecx, [esp + 0x30]
call fcn.00412570
mov eax, dword [esp + 0x68]
push str._GUI_CTRLHANDLE
lea ecx, [esp + 0xa0]
mov dword [esp + 0x40], 7
mov dword [esp + 0x34], eax
call fcn.0040caee
push 2
push 1
lea eax, [esp + 0x38]
push eax
lea eax, [esp + 0xa8]
push eax
call fcn.0040d380
lea ecx, [esp + 0x9c]
call fcn.00405cd3
mov byte [ebx + 0x484], 1
mov eax, dword [esi + 0x10]
push 0
push 1
inc eax
push eax
mov ecx, ebx
call section..text
lea ecx, [esp + 0x30]
mov byte [ebx + 0x484], 0
call fcn.00412570
lea ecx, [esp + 0x50]
call fcn.0044542e
jmp case.default.0x476041
cmp dword [0x4c197c], 0
jne 0x475cea
cmp dword [0x4c2364], 0x64
jge 0x475cea
inc dword [0x4c2364]
push 0
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x40e3ba
push 0xa
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x40e3ba
cmp byte [ebx + 0x485], 1
je 0x40e3f3
lea ecx, [esp + 0x54]
call fcn.0040d3d2
lea eax, [esp + 0x50]
push eax
mov ecx, 0x4c18f0
call fcn.004456dc
test al, al
je 0x475dee
cmp dword [esp + 0x58], 0
je 0x475d0d
lea eax, [esp + 0x54]
push eax
mov ecx, ebx
call fcn.0041cf79
mov esi, eax
test esi, esi
je 0x475d0d
lea ecx, [esp + 0x88]
mov dword [esp + 0x88], 0
mov dword [esp + 0x90], 0
mov dword [esp + 0x94], 1
call fcn.00412570
mov eax, dword [esp + 0x50]
push str._TRAY_ID
lea ecx, [esp + 0xb0]
mov dword [esp + 0x98], 1
mov dword [esp + 0x8c], eax
call fcn.0040caee
push 2
push 1
lea eax, [esp + 0x90]
push eax
lea eax, [esp + 0xb8]
push eax
call fcn.0040d380
lea ecx, [esp + 0xac]
call fcn.00405cd3
mov byte [ebx + 0x485], 1
mov eax, dword [esi + 0x10]
push 0
push 1
inc eax
push eax
mov ecx, ebx
call section..text
lea ecx, [esp + 0x88]
mov byte [ebx + 0x485], 0
call fcn.00412570
lea ecx, [esp + 0x50]
call fcn.0044542e
jmp case.default.0x476041
lea ecx, [esp + 0x54]
call fcn.00405cd3
jmp 0x40e3f3
push 0xa
push dword [ebx + 0x470]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov dword [esp + 0x74], eax
cmp eax, 0x102
je case.default.0x476041
lea eax, [esp + 0x74]
push eax
push dword [ebx + 0x470]
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
push dword [ebx + 0x470]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x74]
mov dword [esp + 0x10], eax
jmp 0x475e59
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebx + 0x474], 0
mov dword [esp + 0x10], 0
push ecx
lea eax, [esp + 0x14]
push eax
mov eax, dword [ebx]
mov ecx, dword [eax + 4]
add ecx, ebx
call fcn.00402f0e
mov byte [ebx + 0x148], 1
mov dword [ebx + 0xfc], 0
jmp case.default.0x476041
lea ecx, [ebx + 0x16c]
call fcn.0045ea97
mov ecx, eax
call fcn.0045cff8
test al, al
jne 0x475eb6
movsx eax, word [edi + 0xa]
push eax
push 0xa7
mov ecx, ebx
call fcn.0044d520
lea ecx, [esp + 0x20]
call fcn.00414430
jmp case.default.0x476041
lea ecx, [ebx + 0x16c]
call fcn.0045ea97
mov dword [esp + 0x10], eax
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0x20]
push eax
push esi
mov ecx, ebx
call fcn.0045e2fb
jmp 0x40e5aa
push 0xffffffffffffffff
lea eax, [esp + 0x24]
push eax
lea eax, [esp + 0x24]
push eax
push esi
mov ecx, ebx
call fcn.0040fa40
jmp 0x40e5aa
movsx eax, word [eax + 0xa]
push eax
push 0x72
mov ecx, ebx
call fcn.0044d520
lea ecx, [esp + 0x20]
call fcn.00414430
jmp case.default.0x476041
push dword [esi]
call fcn.0042017e
add esp, 4
push dword [esi + 0xc]
call fcn.0042017e
add esp, 4
jmp 0x40e5f8
add ecx, 0xfffffffb
cmp ecx, 0xa
ja case.0x475f37.6
jmp dword [ecx*4 + 0x4762df]
test edx, edx
je case.0x475f37.6
push edx
call dword [sym.imp.OLEAUT32.dll_VariantCopy]
push dword [esp + 0x20]
call fcn.0042017e
add esp, 4
jmp case.0x475f37.6
test edx, edx
je case.0x475f37.6
push ecx
mov ecx, edx
call fcn.0044aa9c
jmp case.0x475f37.6
lea ecx, [esp + 0x20]
call fcn.0041e3cc
jmp case.0x475f37.6
push dword [edx + 4]
call fcn.0042017e
add esp, 4
push dword [esp + 0x20]
call fcn.0042017e
add esp, 4
jmp case.0x475f37.6
test edx, edx
je case.0x475f37.6
push ecx
mov ecx, edx
call fcn.0043a56f
jmp case.0x475f37.6
test edx, edx
je case.0x475f37.6
push ecx
mov ecx, edx
call fcn.0043a599
jmp case.0x475f37.6
test edx, edx
je case.0x475f37.6
push ecx
mov ecx, edx
call fcn.00401926
jmp case.0x475f37.6
mov dword [ebx + 0xfc], 1
jmp case.default.0x476041
push 0xa
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp dword [ebx + 0x310], 0
je 0x47602f
mov ecx, dword [ebx + 0x318]
call fcn.0041e3a5
test edx, edx
jl 0x47602f
jg 0x476015
cmp eax, dword [ebx + 0x310]
jb 0x47602f
cmp dword [ebx + 0xfc], 2
je 0x475e6b
mov dword [esp + 0x10], 0
jmp 0x475e59
mov eax, dword [ebx + 0xfc]
add eax, 0xfffffffd
cmp eax, 3
ja case.default.0x476041
jmp dword [eax*4 + 0x47630b]
mov ecx, ebx
call fcn.00468a48
jmp 0x47607a
mov ecx, ebx
call fcn.00468a48
jmp 0x476063
push 1
mov ecx, ebx
call fcn.00401dce
mov esi, eax
test esi, esi
js 0x476080
jg case.default.0x476041
jmp 0x4760b9
push 1
mov ecx, ebx
call fcn.00401dce
mov esi, eax
test esi, esi
jns 0x4760af
mov eax, esi
neg eax
push 0
push eax
mov eax, dword [ebx]
mov ecx, dword [eax + 4]
add ecx, ebx
call fcn.0044d7e4
push ecx
lea eax, [esp + 0x14]
push eax
mov eax, dword [ebx]
mov dword [esp + 0x18], 0
mov ecx, dword [eax + 4]
add ecx, ebx
call fcn.00402f0e
test esi, esi
je case.default.0x476041
test esi, esi
jle 0x476126
mov eax, dword [ebx + 0xfc]
cmp eax, 5
je 0x4760c9
cmp eax, 3
jne 0x476126
mov eax, dword [ebx + 0x1f8]
lea ecx, [esp + 0x78]
mov esi, dword [eax]
mov dword [esp + 0x78], 0
mov dword [esp + 0x80], 0
mov dword [esp + 0x84], 1
call fcn.00412570
push 0
lea eax, [esp + 0x7c]
push eax
mov eax, dword [ebx]
mov dword [esp + 0x8c], 7
mov ecx, dword [eax + 4]
add ecx, ebx
mov dword [esp + 0x80], esi
call fcn.0045d12a
lea ecx, [esp + 0x78]
call fcn.00412570
mov ecx, dword [ebx + 0x314]
mov byte [ebx + 0x148], 1
mov dword [ebx + 0xfc], 0
call fcn.00448355
jmp case.default.0x476041
push 0xa
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp dword [ebx + 0x468], 0
je 0x476184
mov ecx, dword [ebx + 0x46c]
call fcn.0041e3a5
test edx, edx
jl 0x476184
jg 0x476171
cmp eax, dword [ebx + 0x468]
jb 0x476184
mov eax, dword [ebx + 0x474]
test eax, eax
je 0x475e51
jmp 0x475e40
mov eax, dword [ebx + 0xfc]
xor esi, esi
mov byte [esp + 0xf], 0
mov dword [esp + 0x10], esi
cmp eax, 8
jne 0x4761c2
mov ecx, dword [ebx + 0x458]
lea eax, [esp + 0xf]
push eax
lea edx, [esp + 0x14]
call fcn.00446f5b
add esp, 4
cmp byte [esp + 0xf], 1
jne case.default.0x476041
mov esi, dword [esp + 0x10]
jmp 0x4761cb
cmp eax, 9
jne case.default.0x476041
mov ecx, dword [ebx + 0x474]
mov eax, 0xcccccccc
mov dword [esp + 0x44], eax
test ecx, ecx
je 0x476224
lea eax, [esp + 0x44]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
cmp dword [esp + 0x44], 0x103
jne 0x47620a
push 0
push dword [ebx + 0x474]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne case.default.0x476041
push dword [ebx + 0x474]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x44]
mov dword [ebx + 0x474], 0
cmp dword [ebx + 0xfc], 8
jne 0x476257
mov dword [esp + 0x10], esi
fild dword [esp + 0x10]
test esi, esi
jns 0x47623f
fadd qword [0x4b6568]
push ecx
fstp qword [esp + 0x14]
lea eax, [esp + 0x14]
push eax
mov eax, dword [ebx]
mov ecx, dword [eax + 4]
add ecx, ebx
call fcn.0045f5bc
jmp 0x476266
push 0
push eax
mov eax, dword [ebx]
mov ecx, dword [eax + 4]
add ecx, ebx
call fcn.00407ba9
push dword [ebx + 0x314]
mov byte [ebx + 0x148], 1
mov dword [ebx + 0xfc], 0
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp case.default.0x476041
push ecx
lea eax, [esp + 0x50]
push eax
mov eax, dword [ebx]
mov dword [esp + 0x54], 0
mov ecx, dword [eax + 4]
add ecx, ebx
call fcn.00402f0e
jmp 0x40e4e7
lea eax, [esp + 0xdc]
push eax
call dword [sym.imp.USER32.dll_TranslateMessage]
lea eax, [esp + 0xdc]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageW]
push 0
push 0
push 0
lea eax, [esp + 0xe8]
push eax
call esi
test eax, eax
jg 0x4762a7
jmp 0x40e504