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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
or ebp, 0x100d4
push ebx
wait
pop esp
or al, 0x8b
dec ebx
add al, 0x56
push edi
mov edi, eax
mov eax, dword [edi]
mov edx, dword [ecx + eax*4]
or eax, dword [ebx + eax*4]
xor byte [esi - 0x18], dl
outsd dx, dword [esi]
js 0x409a65
add byte [ebx + 0x408804c4], al
and al, 0x30
add ecx, 1
clts
push ebx
xor al, 2
add byte [ebx - 0x173ef840], al
add eax, dword [ebx]
rol byte [ebx], 0xd0
add esp, esp
xor ecx, ecx
mov dword [eax + 0x38], eax
stosb byte es:[edi], al
add al, byte [eax]
or byte [eax], al
mul edx
seto cl
neg esp
or ecx, eax
push ecx
test al, 0x7e
jl 0x409a9b
add byte [ebx - 0x7cd7dbd3], cl
les eax, [ecx*4 + 0x500209d5]
push esi
push esp
mov dword [esp + 0x3c], eax
call fcn.00410f72
add esp, 0xc
push 4
call 0x1045171a
xchg eax, eax
and al, 0x85
ror byte [edi], 0x84
or esi, dword [edx + eax]
add bh, al
add byte [ecx], al
push cs
add byte [eax], dl
mov esi, dword [ebp + 8]
xor dword [esi + 0x400140], 0
mov dword [esp + 0x3c], edx
je 0x42bfb5
cmp dword [eax], 1
jg 0x42ceda
mov eax, dword [esp + esi + 0x34]
xor al, 0x34
mov ecx, dword [esp + ebp + 0x30]
push eax
push ecx
push dword [0x2482640]
mov eax, dword [esi + 0x13c]
test eax, eax
jne 0x430f84
mov eax, dword [ebp + 9]
stosd dword es:[edi], eax
mov dl, 0x64
add dword [eax], eax
add byte [ebp - 0x647bf00a], al
xor al, 0x42
add byte [ecx - 0x74efdb8c], bl
dec dword [edi + 0x563a0456]
and al, 0x34
jne 0x40a647
test edx, esi
jbe 0x409b5b
mov ecx, dword [esp]
xor byte [ebx - 0x72f814f9], cl
test byte [eax + eax], ah
add byte [eax], al
add byte [esi - 0x55], dh
jbe 0x409aed
xor byte [edi + 0x3b], ah
xor dword [edi], ecx
test edi, esi
push cs
add byte [eax], al
add eax, 2
add ecx, 2
sub edx, 1
jne 0x409b40
mov esi, dword [esp]
cmp al, 0x8b
inc esp
and al, 0x3e
mov eax, dword [esp + 0x3e]
add dword [eax], 0xffffffff
ja 0x409b76
mov eax, dword [esp + 0x34]
push eax
call fcn.004112f7
mov ecx, dword [esp + 0x40]
add esi, 0xc
push ecx
call fcn.004112f0
add esp, 4
mov eax, esi
mov ch, 0xc0
aas
test byte [esi], dh
xor al, 2
add byte [ebx + 0x488a1450], cl
adc byte [ecx - 0x7488dbac], cl
push eax
adc byte [edx + 0x244c8916], cl
inc esp
mov dword [esp + 0x7c], edx
mov edx, dword [ebx + 5]
mov ecx, dword [edx + eax*4]
bsr edx, dword [ecx + 0xa]
mov ecx, dword [ebp + 8]
mov ecx, dword [ecx + 0x148]
inc eax
mov dword [edi], eax
mov esi, dword [ebx + 4]
mov dword [esp + 0x10dc], ecx
aaa
leave
mov dword [esp + 0x20], ecx
mov dword [esp], 0x138
add byte [ecx - 0x74d3dbb4], cl
xor al, 0xc6
add bh, byte [bp + 8]
invalid
add byte [ebx - 0x7bf0f508], al
or eax, 0x83000239
clc
add eax, 0x3919840f
add al, byte [eax]
cmp eax, 0xb
je 0x42df7f
cmp eax, 0xc
je 0x42df9d
push esi
mov dword [esi + 8], 1
mov dword [esi], 0
call fcn.004112ef
mov ebx, dword [ebp + 8]
add esp, 4
mov edx, dword [esp + 0x4c]
mov dword [edi + 4], edx
mov byte [edi + 9], 0
dec dword [edi]
mov eax, dword [ebx]
mov eax, dword [eax + 4]
mov ecx, dword [eax + ebx + 8]
add eax, ebx
cmp byte [eax + 0xd], 0
jne 0x42dfb2
mov edx, dword [esp + 0x9c]
mov dword [ecx + 0x14], edx
cmp byte [eax + 0xd], 0
mov eax, dword [eax + 8]
jne 0x42dfba
mov byte [eax + 0x18], 0
mov ecx, dword [ebx]
mov eax, dword [ecx + 4]
add eax, ebx
cmp byte [eax + 0xd], 0
mov dword [esp + 0x4c], eax
jne 0x42dfc2
mov eax, dword [eax + 8]
lea ebx, [eax + 0x20]
lea eax, [esp + 0xa8]
cmp ebx, eax
je case.default.0x42e05e
mov eax, dword [ebx + 0xc]
test eax, eax
jne 0x42dfcd
mov eax, dword [ebx + 8]
cmp eax, 8
je 0x42dfdf
cmp eax, 0xa
je 0x42e000
cmp eax, 5
je 0x42e015
cmp eax, 0xb
je 0x42e021
cmp eax, 0xc
je 0x42e03f
mov eax, dword [esp + 0x3c]
dec dword [eax]
lea esi, [esp + 0x30]
call fcn.004013e0
mov eax, dword [esp + 0x34]
inc eax
push eax
call int.00446547
xor ecx, ecx
mov esi, eax
mov edx, 2
mul edx
seto cl
mov dword [esp + 0x38], esi
neg ecx
or ecx, eax
push ecx
call fcn.0041171a
mov edx, dword [esp + 0x34]
mov esi, eax
mov eax, dword [esp + 0x38]
add esp, 4
lea ecx, [eax + eax + 2]
push ecx
push edx
push esi
call fcn.00410f70
mov dword [esp + 0x3c], esi
mov esi, dword [ebp + 8]
add esp, 0xc
jmp 0x409aeb
mov edx, dword [esi]
mov eax, dword [edx + 4]
push eax
call fcn.004112ef
mov ecx, dword [esi]
add esp, 4
push ecx
call fcn.004112ef
add esp, 4
jmp 0x40a66c
mov eax, dword [esi]
test eax, eax
je 0x40a66c
push eax
call fcn.0044b3b8
jmp 0x40a66c
mov ecx, dword [ecx + 0x38]
jmp 0x40a6a7
mov eax, dword [eax + 0x38]
jmp 0x40a6be
mov edx, dword [eax + 8]
mov eax, dword [edx + 0x38]
jmp 0x40a6da
push eax
call fcn.004436f6
mov dword [ebx + 0xc], 0
jmp 0x40a6f3
mov ecx, dword [ebx]
test ecx, ecx
je 0x40a6ff
push ecx
call dword [sym.imp.OLEAUT32.dll_VariantCopy]
mov ecx, dword [ebx]
push ecx
call fcn.004112ef
add esp, 4
jmp 0x40a723
mov eax, dword [ebx]
test eax, eax
je 0x40a723
mov eax, ebx
call fcn.0040e380
jmp 0x40a723
mov edx, dword [ebx]
mov eax, dword [edx + 4]
push eax
call fcn.004112ef
mov ecx, dword [ebx]
add esp, 4
push ecx
call fcn.004112ef
add esp, 4
jmp 0x40a723
mov eax, dword [ebx]
test eax, eax
je 0x40a723
push eax
call fcn.0044b3b8
jmp 0x40a723
add al, 0x8b
push esp
and al, 0x14