Function at 0x40e570
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 + 0x2c], ebx
cmp eax, 0xf3c
jge 0x4765bb
inc eax
mov dword [ebx + 0xec], eax
cmp eax, 1
je 0x40e9f2
cmp byte [ebx + 0x100], 0
mov byte [ebx + 0x148], 0
jne 0x40e867
mov esi, dword [0x48e6d4]
cmp byte [ebx + 0x148], 0
mov edx, 2
jne 0x40e867
cmp byte [0x4c20b7], 0
jne 0x4765d6
cmp byte [0x4c2848], 0
jne 0x4765e8
push 1
push 0
push 0
push 0
lea eax, [esp + 0x5c]
push eax
call esi
test eax, eax
jne 0x40e990
cmp byte [0x4c20c0], 1
je 0x476610
cmp dword [ebx + 0xfc], 1
je 0x476e3d
mov edx, 2
cmp dword [0x4c2104], 0
jne 0x47662d
cmp byte [0x4c20c5], 1
je 0x4766ba
cmp dword [ebx + 0x480], 0
je 0x40e6a4
cmp byte [0x4c3360], 0
jne 0x40e6a4
mov esi, dword [ebx + 0x478]
lea eax, [ebx + 0x478]
mov byte [0x4c3360], 1
mov dword [esp + 0x14], 0
mov dword [esp + 0xc], eax
lea ecx, [ecx]
test esi, esi
jne 0x40e88f
mov ebx, dword [esp + 0xc]
lea esp, [esp]
mov eax, dword [ebx]
mov dword [esp + 0xc], eax
test eax, eax
jne 0x40e8d8
mov ebx, dword [esp + 0x2c]
mov byte [0x4c3360], al
cmp dword [esp + 0x14], eax
jg case.default.0x476be0
lea edx, [eax + 2]
cmp byte [0x4c281c], 0
je 0x40e757
cmp byte [ebx + 0x484], 1
je 0x40e757
cmp byte [0x4c2848], 1
je 0x40e757
xor ecx, ecx
mov eax, 8
mul edx
seto cl
mov dword [esp + 0x54], 0
mov dword [esp + 0x58], 8
neg ecx
or ecx, eax
push ecx
call fcn.00420b6a
add esp, 4
xor ecx, ecx
push 4
mov dword [esp + 0x54], eax
mov word [eax], cx
call fcn.00420b6a
add esp, 4
test eax, eax
je 0x40ea88
mov dword [eax], 1
mov dword [esp + 0x5c], eax
lea esp, [esp]
cmp dword [0x4c283c], 0
jne 0x4766f6
cmp byte [0x4c281c], 0
je 0x476879
mov esi, dword [esp + 0x5c]
dec dword [esi]
jne 0x40e757
push dword [esp + 0x50]
call fcn.00420bde
add esp, 4
push esi
call fcn.00420bde
add esp, 4
mov ecx, ebx
call fcn.0040eb30
cmp al, 1
je case.default.0x476be0
cmp byte [0x4c2990], 0
jne 0x4768ab
mov eax, dword [ebx + 0xfc]
cmp eax, 7
je 0x47699b
cmp eax, 8
je 0x476cf2
cmp eax, 9
je 0x476cf2
cmp eax, 2
je 0x476b8a
cmp eax, 3
je 0x476b8a
cmp eax, 4
je 0x476b8a
cmp eax, 5
je 0x476b8a
cmp eax, 6
je 0x476b8a
mov eax, dword [ebp + 8]
mov dword [ebx + 0xf4], eax
mov esi, eax
inc eax
mov dword [ebp + 8], eax
cmp esi, dword [0x4c32f8]
jg 0x476b7b
test esi, esi
jle 0x476b7b
shl esi, 4
add esi, dword [0x4c332c]
je 0x476b7b
mov eax, dword [esi + 4]
xor edx, edx
mov ecx, 1
mov dword [esp + 0x18], edx
mov dword [esp + 0x20], edx
mov dword [esp + 0x24], ecx
mov edi, dword [eax]
mov dword [esp + 0x14], edx
movsx eax, word [edi + 8]
test eax, eax
jne 0x40e8ec
lea eax, [ebp + 8]
push eax
push esi
mov ecx, ebx
call fcn.0040eb60
mov esi, dword [esp + 0x20]
test esi, esi
jne 0x40e967
mov edx, dword [esp + 0x18]
mov ecx, dword [esp + 0x24]
cmp ecx, 5
jge 0x476aca
mov dword [esp + 0x24], 1
mov dword [esp + 0x18], 0
mov esi, dword [0x48e6d4]
cmp byte [ebx + 0x100], 0
je 0x40e5c0
mov eax, dword [ebx + 0xec]
mov byte [ebx + 0x148], 0
cmp eax, 1
je 0x40e9fc
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 0x40e8d0
mov edi, dword [edi + 0x14]
call dword [0x48e798]
mov ecx, eax
sub eax, edi
xor edx, edx
cmp edi, 0x7fffffff
ja 0x4766d4
cmp ecx, 0x7fffffff
ja 0x40e8bb
cdq
mov edi, dword [esi]
test edx, edx
jl 0x40e8d0
jg 0x40ea4e
cmp eax, dword [edi + 0x18]
jae 0x40ea4e
mov esi, dword [esi + 4]
jmp 0x40e670
mov ecx, dword [eax]
cmp byte [ecx + 0x11], 0
jne 0x4766e5
mov eax, dword [eax + 4]
jmp 0x40e682
cmp eax, 0x33
jne 0x40e8fe
push esi
mov ecx, ebx
call fcn.0040ed80
jmp 0x40e827
dec eax
cmp eax, 0x7e
ja case.0x40e90f.2
movzx eax, byte [eax + 0x40eaa4]
jmp dword [eax*4 + 0x40ea90]
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x18]
push eax
push esi
push 0
mov ecx, ebx
call fcn.00414670
test eax, eax
js 0x40e827
mov ecx, dword [esi + 4]
mov eax, dword [esp + 0x14]
mov eax, dword [ecx + eax*4]
cmp word [eax + 8], 0x7f
je 0x40e827
jmp 0x476a94
lea eax, [esp + 0x37]
push eax
lea eax, [esp + 0x1c]
push eax
lea eax, [esp + 0x1c]
push eax
push esi
push 0
mov ecx, ebx
call fcn.004139c0
jmp 0x40e92a
mov eax, dword [esi + 0xc]
dec dword [eax]
mov eax, dword [esi + 0xc]
cmp dword [eax], 0
je 0x476ab0
push esi
call fcn.00420bde
add esp, 4
mov dword [esp + 0x20], 0
jmp 0x40e833
cmp dword [esp + 0x50], 0x12
je 0x4765fa
lea eax, [esp + 0x4c]
push eax
mov ecx, 0x4c2810
call fcn.0041f85f
test eax, eax
jne 0x40e9c1
lea eax, [esp + 0x4c]
push eax
mov ecx, 0x4c2810
call fcn.0041f02e
test eax, eax
je 0x40e9da
push 1
push 0
push 0
push 0
lea eax, [esp + 0x5c]
push eax
call esi
test eax, eax
je 0x40e603
jmp 0x40e990
lea eax, [esp + 0x4c]
push eax
call dword [0x48e6cc]
lea eax, [esp + 0x4c]
push eax
call dword [0x48e6c8]
jmp 0x40e9c1
call fcn.0041f950
jmp 0x40e5a6
mov ecx, ebx
call fcn.00401d06
cmp byte [ebx + 0x100], 1
je 0x40e884
mov ecx, ebx
call fcn.0041f97c
push 0
call dword [0x48e6c4]
push dword [0x4c20e8]
call dword [0x48e620]
mov esi, dword [0x48e6c0]
push 0
push 0
push 0
lea eax, [esp + 0xe8]
push eax
call esi
test eax, eax
jle 0x40e884
jmp 0x476e5c
inc dword [esp + 0x14]
call dword [0x48e798]
mov dword [edi + 0x14], eax
push dword [esi]
mov ecx, ebx
call fcn.0041de82
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 fcn.0040158e
mov eax, dword [esi]
mov byte [eax + 0x10], 0
mov esi, dword [esi + 4]
jmp 0x40e670
xor eax, eax
jmp 0x40e715
push 0xffffffffffffffff
push 0x9a
mov byte [0x4c20b6], 0
call fcn.0044e07b
or eax, 0xffffffff
jmp 0x40e886
cmp byte [ebx + 0x149], 0
je 0x40e622
jmp 0x40e5df
cmp dword [ebx + 0xfc], 0
je 0x40e622
jmp 0x40e5ec
mov byte [ebx + 0x100], 1
mov dword [ebx + 0xfc], 1
jmp 0x40e603
mov byte [0x4c20c5], 0
mov byte [0x4c20c0], 0
mov dword [ebx + 0xfc], 1
jmp 0x40e610
mov eax, dword [0x4c2108]
mov esi, dword [eax]
call fcn.0044e3c4
mov edx, dword [ebx + 0x1cc]
xor edi, edi
test edx, edx
je 0x47665f
mov ecx, dword [ebx + 0x1c8]
mov eax, dword [ecx]
mov eax, dword [eax]
test eax, eax
je 0x476657
cmp dword [eax], esi
je 0x47665f
inc edi
add ecx, 4
cmp edi, edx
jb 0x47664b
cmp edi, edx
je 0x4766aa
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.0041de82
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.0040ca50
mov eax, dword [esi + 0x10]
push 0
push 1
inc eax
push eax
mov ecx, ebx
call fcn.0040158e
jmp case.default.0x476be0
mov esi, dword [0x48e6d4]
mov edx, 2
jmp 0x40e62f
cmp byte [0x4c20b7], 0
jne 0x40e63c
push 0xa
call dword [0x48e174]
jmp 0x40e85a
cmp ecx, 0x7fffffff
jbe 0x40e8bb
jmp 0x40e8ba
lea eax, [esp + 0xc]
push eax
mov ecx, ebx
call fcn.0045ba89
jmp 0x40e680
mov eax, dword [0x4c2840]
lea ecx, [esp + 0x4c]
mov esi, dword [eax]
push esi
call fcn.00469791
mov ecx, 0x4c283c
call fcn.0046f30d
test esi, esi
je 0x47671d
push ecx
mov ecx, esi
call fcn.0046981b
cmp dword [esp + 0x54], 0
mov dword [0x4c3364], 0
je 0x40e720
lea eax, [esp + 0x50]
push eax
mov ecx, ebx
call fcn.0041de82
mov esi, eax
test esi, esi
je 0x40e720
lea ecx, [esp + 0x38]
mov dword [esp + 0x38], 0
mov dword [esp + 0x40], 0
mov dword [esp + 0x44], 1
call fcn.004128f0
mov eax, dword [esp + 0x4c]
push str._GUI_CTRLID
lea ecx, [esp + 0xd0]
mov dword [esp + 0x48], 1
mov dword [esp + 0x3c], eax
call fcn.0040cb26
push 2
push 1
lea eax, [esp + 0x40]
push eax
lea eax, [esp + 0xd8]
push eax
call fcn.0040d422
lea ecx, [esp + 0xcc]
call fcn.00407dce
lea ecx, [esp + 0x38]
call fcn.004128f0
mov eax, dword [esp + 0x60]
push str._GUI_WINHANDLE
lea ecx, [esp + 0xc0]
mov dword [esp + 0x48], 7
mov dword [esp + 0x3c], eax
call fcn.0040cb26
push 2
push 1
lea eax, [esp + 0x40]
push eax
lea eax, [esp + 0xc8]
push eax
call fcn.0040d422
lea ecx, [esp + 0xbc]
call fcn.00407dce
lea ecx, [esp + 0x38]
call fcn.004128f0
mov eax, dword [esp + 0x64]
push str._GUI_CTRLHANDLE
lea ecx, [esp + 0xa0]
mov dword [esp + 0x48], 7
mov dword [esp + 0x3c], eax
call fcn.0040cb26
push 2
push 1
lea eax, [esp + 0x40]
push eax
lea eax, [esp + 0xa8]
push eax
call fcn.0040d422
lea ecx, [esp + 0x9c]
call fcn.00407dce
mov byte [ebx + 0x484], 1
mov eax, dword [esi + 0x10]
push 0
push 1
inc eax
push eax
mov ecx, ebx
call fcn.0040158e
lea ecx, [esp + 0x38]
mov byte [ebx + 0x484], 0
call fcn.004128f0
lea ecx, [esp + 0x4c]
call fcn.0044dd81
jmp case.default.0x476be0
cmp dword [0x4c297c], 0
jne 0x47689e
cmp dword [0x4c3364], 0x64
jge 0x47689e
inc dword [0x4c3364]
push 0
call dword [0x48e174]
jmp 0x40e73a
push 0xa
call dword [0x48e174]
jmp 0x40e73a
cmp byte [ebx + 0x485], 1
je 0x40e773
lea ecx, [esp + 0x50]
call fcn.0040d3dc
lea eax, [esp + 0x4c]
push eax
mov ecx, 0x4c28f0
call fcn.00446183
test al, al
je 0x47698d
cmp dword [esp + 0x54], 0
je 0x4768c1
lea eax, [esp + 0x50]
push eax
mov ecx, ebx
call fcn.0041de82
mov esi, eax
test esi, esi
je 0x4768c1
lea ecx, [esp + 0x70]
mov dword [esp + 0x70], 0
mov dword [esp + 0x78], 0
mov dword [esp + 0x7c], 1
call fcn.004128f0
mov eax, dword [esp + 0x4c]
push str._TRAY_ID
lea ecx, [esp + 0xb0]
mov dword [esp + 0x80], 1
mov dword [esp + 0x74], eax
call fcn.0040cb26
push 2
push 1
lea eax, [esp + 0x78]
push eax
lea eax, [esp + 0xb8]
push eax
call fcn.0040d422
lea ecx, [esp + 0xac]
call fcn.00407dce
mov byte [ebx + 0x485], 1
mov eax, dword [esi + 0x10]
push 0
push 1
inc eax
push eax
mov ecx, ebx
call fcn.0040158e
lea ecx, [esp + 0x70]
mov byte [ebx + 0x485], 0
call fcn.004128f0
lea ecx, [esp + 0x4c]
call fcn.0044dd81
jmp case.default.0x476be0
lea ecx, [esp + 0x50]
call fcn.00407dce
jmp 0x40e773
push 0xa
push dword [ebx + 0x470]
call dword [0x48e164]
mov dword [esp + 0x48], eax
cmp eax, 0x102
je case.default.0x476be0
lea eax, [esp + 0x48]
push eax
push dword [ebx + 0x470]
call dword [0x48e270]
push dword [ebx + 0x470]
call dword [0x48e1fc]
mov eax, dword [esp + 0x48]
mov dword [esp + 0xc], eax
jmp 0x4769f8
push eax
call dword [0x48e1fc]
mov dword [ebx + 0x474], 0
mov dword [esp + 0xc], 0
push ecx
lea eax, [esp + 0x10]
push eax
mov eax, dword [ebx]
mov ecx, dword [eax + 4]
add ecx, ebx
call fcn.00401e86
mov byte [ebx + 0x148], 1
mov dword [ebx + 0xfc], 0
jmp case.default.0x476be0
lea ecx, [ebx + 0x16c]
call fcn.0045f6d7
mov ecx, eax
call fcn.0045dc54
test al, al
jne 0x476a55
movsx eax, word [edi + 0xa]
push eax
push 0xa7
mov ecx, ebx
call fcn.0044e07b
lea ecx, [esp + 0x18]
call fcn.0040dcf0
jmp case.default.0x476be0
lea ecx, [ebx + 0x16c]
call fcn.0045f6d7
mov dword [esp + 0xc], eax
lea eax, [esp + 0xc]
push eax
lea eax, [esp + 0x18]
push eax
push esi
mov ecx, ebx
call fcn.0045ef45
jmp 0x40e92a
push 0xffffffffffffffff
lea eax, [esp + 0x1c]
push eax
lea eax, [esp + 0x1c]
push eax
push esi
mov ecx, ebx
call fcn.0040fa70
jmp 0x40e92a
movsx eax, word [eax + 0xa]
push eax
push 0x72
mov ecx, ebx
call fcn.0044e07b
lea ecx, [esp + 0x18]
call fcn.0040dcf0
jmp case.default.0x476be0
push dword [esi]
call fcn.00420bde
add esp, 4
push dword [esi + 0xc]
call fcn.00420bde
add esp, 4
jmp 0x40e978
add ecx, 0xfffffffb
cmp ecx, 0xa
ja case.0x476ad6.6
jmp dword [ecx*4 + 0x476e93]
test edx, edx
je case.0x476ad6.6
push edx
call dword [0x48e448]
push dword [esp + 0x18]
call fcn.00420bde
add esp, 4
jmp case.0x476ad6.6
test edx, edx
je case.0x476ad6.6
push ecx
mov ecx, edx
call fcn.00445ec5
jmp case.0x476ad6.6
lea ecx, [esp + 0x18]
call fcn.0041f08d
jmp case.0x476ad6.6
push dword [edx + 4]
call fcn.00420bde
add esp, 4
push dword [esp + 0x18]
call fcn.00420bde
add esp, 4
jmp case.0x476ad6.6
test edx, edx
je case.0x476ad6.6
push ecx
mov ecx, edx
call fcn.0043afc5
jmp case.0x476ad6.6
test edx, edx
je case.0x476ad6.6
push ecx
mov ecx, edx
call fcn.0043afef
jmp case.0x476ad6.6
test edx, edx
je case.0x476ad6.6
push ecx
mov ecx, edx
call fcn.00401dab
jmp case.0x476ad6.6
mov dword [ebx + 0xfc], 1
jmp case.default.0x476be0
push 0xa
call dword [0x48e174]
cmp dword [ebx + 0x310], 0
je 0x476bce
mov ecx, dword [ebx + 0x318]
call fcn.0041f007
test edx, edx
jl 0x476bce
jg 0x476bb4
cmp eax, dword [ebx + 0x310]
jb 0x476bce
cmp dword [ebx + 0xfc], 2
je 0x476a0a
mov dword [esp + 0xc], 0
jmp 0x4769f8
mov eax, dword [ebx + 0xfc]
add eax, 0xfffffffd
cmp eax, 3
ja case.default.0x476be0
jmp dword [eax*4 + 0x476ebf]
mov ecx, ebx
call fcn.004696b9
jmp 0x476c19
mov ecx, ebx
call fcn.004696b9
jmp 0x476c02
push 1
mov ecx, ebx
call fcn.004013fa
mov esi, eax
test esi, esi
js 0x476c1f
jg case.default.0x476be0
jmp 0x476c58
push 1
mov ecx, ebx
call fcn.004013fa
mov esi, eax
test esi, esi
jns 0x476c4e
mov eax, esi
neg eax
push 0
push eax
mov eax, dword [ebx]
mov ecx, dword [eax + 4]
add ecx, ebx
call fcn.0044e33f
push ecx
lea eax, [esp + 0x10]
push eax
mov eax, dword [ebx]
mov dword [esp + 0x14], 0
mov ecx, dword [eax + 4]
add ecx, ebx
call fcn.00401e86
test esi, esi
je case.default.0x476be0
test esi, esi
jle 0x476cd1
mov eax, dword [ebx + 0xfc]
cmp eax, 5
je 0x476c68
cmp eax, 3
jne 0x476cd1
mov eax, dword [ebx + 0x1f8]
lea ecx, [esp + 0x80]
mov esi, dword [eax]
mov dword [esp + 0x80], 0
mov dword [esp + 0x88], 0
mov dword [esp + 0x8c], 1
call fcn.004128f0
push 0
lea eax, [esp + 0x84]
push eax
mov eax, dword [ebx]
mov dword [esp + 0x94], 7
mov ecx, dword [eax + 4]
add ecx, ebx
mov dword [esp + 0x88], esi
call fcn.0045dd83
lea ecx, [esp + 0x80]
call fcn.004128f0
mov ecx, dword [ebx + 0x314]
mov byte [ebx + 0x148], 1
mov dword [ebx + 0xfc], 0
call fcn.00448dd7
jmp case.default.0x476be0
push 0xa
call dword [0x48e174]
cmp dword [ebx + 0x468], 0
je 0x476d2f
mov ecx, dword [ebx + 0x46c]
call fcn.0041f007
test edx, edx
jl 0x476d2f
jg 0x476d1c
cmp eax, dword [ebx + 0x468]
jb 0x476d2f
mov eax, dword [ebx + 0x474]
test eax, eax
je 0x4769f0
jmp 0x4769df
mov eax, dword [ebx + 0xfc]
xor esi, esi
mov byte [esp + 0x13], 0
mov dword [esp + 0xc], esi
cmp eax, 8
jne 0x476d6d
mov ecx, dword [ebx + 0x458]
lea eax, [esp + 0x13]
push eax
lea edx, [esp + 0x10]
call fcn.004479e2
add esp, 4
cmp byte [esp + 0x13], 1
jne case.default.0x476be0
mov esi, dword [esp + 0xc]
jmp 0x476d76
cmp eax, 9
jne case.default.0x476be0
mov ecx, dword [ebx + 0x474]
mov eax, 0xcccccccc
mov dword [esp + 0x30], eax
test ecx, ecx
je 0x476dcf
lea eax, [esp + 0x30]
push eax
push ecx
call dword [0x48e270]
cmp dword [esp + 0x30], 0x103
jne 0x476db5
push 0
push dword [ebx + 0x474]
call dword [0x48e164]
test eax, eax
jne case.default.0x476be0
push dword [ebx + 0x474]
call dword [0x48e1fc]
mov eax, dword [esp + 0x30]
mov dword [ebx + 0x474], 0
cmp dword [ebx + 0xfc], 8
jne 0x476e0c
movd xmm0, esi
cvtdq2pd xmm0, xmm0
push ecx
shr esi, 0x1f
lea eax, [esp + 0x94]
addsd xmm0, qword [esi*8 + 0x4b7590]
push eax
mov eax, dword [ebx]
mov ecx, dword [eax + 4]
add ecx, ebx
movsd qword [esp + 0x98], xmm0
call fcn.004601ff
jmp 0x476e1b
push 0
push eax
mov eax, dword [ebx]
mov ecx, dword [eax + 4]
add ecx, ebx
call fcn.00401ebf
push dword [ebx + 0x314]
mov byte [ebx + 0x148], 1
mov dword [ebx + 0xfc], 0
call dword [0x48e174]
jmp case.default.0x476be0
push ecx
lea eax, [esp + 0x30]
push eax
mov eax, dword [ebx]
mov dword [esp + 0x34], 0
mov ecx, dword [eax + 4]
add ecx, ebx
call fcn.00401e86
jmp 0x40e867
lea eax, [esp + 0xdc]
push eax
call dword [0x48e6cc]
lea eax, [esp + 0xdc]
push eax
call dword [0x48e6c8]
push 0
push 0
push 0
lea eax, [esp + 0xe8]
push eax
call esi
test eax, eax
jg 0x476e5c
jmp 0x40e884