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

Disassembly:
push 0xffffffffffffffff
push 0x45c6f4
mov eax, dword fs:[0]
push eax
sub esp, 0xf4
push ebx
push ebp
push esi
push edi
mov eax, dword [0x77a1d4]
xor eax, esp
push eax
lea eax, [esp + 0x108]
mov dword fs:[0], eax
mov esi, ecx
push 8
lea edi, [esi + 0x58]
xor ebx, ebx
push 0x4622e4
mov ecx, edi
mov dword [esp + 0x1c], ebx
call fcn.00401720
mov edi, dword [edi]
push edi
lea ecx, [esi + 0xb0]
call fcn.0041bb02
mov ecx, dword [esi + 0x20]
lea eax, [esp + 0x68]
push eax
push ecx
call dword [sym.imp.USER32.dll_GetClientRect]
add dword [esp + 0x6c], 0x1e
push 1
push esi
lea edx, [esp + 0x70]
push edx
lea ebp, [esi + 0x5c]
push 0x50800001
mov ecx, ebp
call fcn.0042e265
mov eax, dword [esi + 0x7c]
mov edi, dword [sym.imp.USER32.dll_SendMessageA]
push 0xf097b1
push ebx
push 0x1001
push eax
call edi
mov ecx, dword [esi + 0x7c]
push ebx
push ebx
push 0x1024
push ecx
call edi
mov edx, dword [esi + 0x7c]
push 0xf097b1
push ebx
push 0x1026
push edx
call edi
mov eax, dword [esi + 0x7c]
push 0x31
push ebx
push 0x1036
push eax
call edi
push 0xffffffffffffffff
push 0x64
push ebx
push 0x460a58
push ebx
mov ecx, ebp
call fcn.0042e3c2
push 0xffffffffffffffff
push 0x64
push ebx
push 0x460a4c
push 1
mov ecx, ebp
call fcn.0042e3c2
push 0xffffffffffffffff
push 0x64
push ebx
push 0x460a38
push 2
mov ecx, ebp
call fcn.0042e3c2
push 0xffffffffffffffff
push 0x64
push ebx
push 0x46235c
push 3
mov ecx, ebp
call fcn.0042e3c2
push 0xffffffffffffffff
push 0x64
push ebx
push 0x460a2c
push 4
mov ecx, ebp
call fcn.0042e3c2
mov esi, dword [sym.imp.OLEAUT32.dll_VariantClear]
lea ecx, [esp + 0x24]
push ecx
call esi
lea edx, [esp + 0x48]
push edx
mov dword [esp + 0x114], ebx
call esi
lea eax, [esp + 0x48]
push eax
mov byte [esp + 0x114], 1
call dword [sym.imp.OLEAUT32.dll_VariantCopy]
cmp eax, ebx
jge 0x40c068
push eax
call fcn.0045a7b0
mov ecx, 8
push str.select__from_material_order_by_wzid
mov word [esp + 0x4c], cx
call fcn.0045a850
lea edx, [esp + 0x48]
push edx
push 0x77b630
mov ecx, 0x77b588
mov dword [esp + 0x58], eax
call fcn.0040ade0
mov eax, dword [0x77b630]
cmp eax, ebx
jne 0x40c0a7
push 0x80004003
call fcn.0045a7b0
mov ecx, dword [eax]
lea edx, [esp + 0x20]
push edx
mov esi, eax
push eax
mov eax, dword [ecx + 0x68]
mov dword [esp + 0x28], ebx
call eax
cmp eax, ebx
jge 0x40c0ca
push 0x460748
push esi
push eax
call fcn.0045a7d0
cmp dword [esp + 0x20], ebx
je 0x40c736
call fcn.0041b555
xor ecx, ecx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x40c0ee
push 0x80004005
call fcn.00401010
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea edi, [eax + 0x10]
mov dword [esp + 0x18], edi
mov eax, dword [0x77b630]
mov byte [esp + 0x110], 2
cmp eax, ebx
jne 0x40c119
push 0x80004003
call fcn.0045a7b0
mov ecx, dword [eax]
mov edx, dword [ecx + 0x98]
push eax
mov esi, eax
call edx
cmp eax, ebx
jge 0x40c136
push 0x460748
push esi
push eax
call fcn.0045a7d0
cmp dword [esp + 0x20], ebx
mov dword [esp + 0x1c], ebx
jle 0x40c712
mov eax, 8
push str.wzid
mov word [esp + 0xac], ax
call fcn.0045a850
mov dword [esp + 0xb0], eax
mov ecx, dword [0x77b630]
mov byte [esp + 0x110], 3
cmp ecx, ebx
je 0x40c09d
lea edx, [esp + 0xa8]
push edx
lea eax, [esp + 0xbc]
push eax
call fcn.00402c50
push eax
lea ecx, [esp + 0x28]
push ecx
mov byte [esp + 0x118], 4
call dword [sym.imp.OLEAUT32.dll_VariantCopyInd]
cmp eax, ebx
jl 0x40c062
mov esi, dword [sym.imp.OLEAUT32.dll_VariantCopy]
lea edx, [esp + 0xb8]
push edx
call esi
lea eax, [esp + 0xa8]
push eax
mov byte [esp + 0x114], 2
call esi
cmp word [esp + 0x24], 1
jne 0x40c764
mov edx, 0x467455
mov eax, edx
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x40c1e1
sub eax, esi
push eax
push edx
lea ecx, [esp + 0x20]
call fcn.00401720
test byte [esp + 0x14], 1
mov dword [esp + 0x110], 2
je 0x40c252
mov eax, dword [esp + 0x34]
and dword [esp + 0x14], 0xfffffffe
cmp eax, ebx
je 0x40c252
mov esi, eax
add eax, 8
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
cmp eax, ebx
jne 0x40c24e
cmp esi, ebx
je 0x40c24e
mov eax, dword [esi]
cmp eax, ebx
je 0x40c235
push eax
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov eax, dword [esi + 4]
cmp eax, ebx
je 0x40c245
push eax
call fcn.004199cf
add esp, 4
push esi
call fcn.004199cf
add esp, 4
mov dword [esp + 0x34], ebx
mov eax, dword [esp + 0x18]
mov edi, dword [esp + 0x1c]
push ebx
push ebx
push ebx
push ebx
push eax
push edi
push 1
mov ecx, ebp
call fcn.0042e40e
mov ecx, 8
push str.wzname
mov word [esp + 0x9c], cx
call fcn.0045a850
mov dword [esp + 0xa0], eax
mov ecx, dword [0x77b630]
mov byte [esp + 0x110], 6
cmp ecx, ebx
je 0x40c09d
lea edx, [esp + 0x98]
push edx
lea eax, [esp + 0xec]
push eax
call fcn.00402c50
push eax
lea ecx, [esp + 0x28]
push ecx
mov byte [esp + 0x118], 7
call dword [sym.imp.OLEAUT32.dll_VariantCopyInd]
cmp eax, ebx
jl 0x40c062
mov esi, dword [sym.imp.OLEAUT32.dll_VariantCopy]
lea edx, [esp + 0xe8]
push edx
call esi
lea eax, [esp + 0x98]
push eax
mov byte [esp + 0x114], 2
call esi
cmp word [esp + 0x24], 1
jne 0x40c7ab
mov edx, 0x467455
mov eax, edx
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x40c306
sub eax, esi
push eax
push edx
lea ecx, [esp + 0x20]
call fcn.00401720
test byte [esp + 0x14], 2
mov dword [esp + 0x110], 2
je 0x40c377
mov eax, dword [esp + 0x44]
and dword [esp + 0x14], 0xfffffffd
cmp eax, ebx
je 0x40c377
mov esi, eax
add eax, 8
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
cmp eax, ebx
jne 0x40c373
cmp esi, ebx
je 0x40c373
mov eax, dword [esi]
cmp eax, ebx
je 0x40c35a
push eax
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov eax, dword [esi + 4]
cmp eax, ebx
je 0x40c36a
push eax
call fcn.004199cf
add esp, 4
push esi
call fcn.004199cf
add esp, 4
mov dword [esp + 0x44], ebx
mov eax, dword [esp + 0x18]
push eax
push 1
push edi
mov ecx, ebp
call fcn.0042e2c9
mov ecx, 8
push str.wzspec
mov word [esp + 0x7c], cx
call fcn.0045a850
mov dword [esp + 0x80], eax
mov ecx, dword [0x77b630]
mov byte [esp + 0x110], 9
cmp ecx, ebx
je 0x40c09d
lea edx, [esp + 0x78]
push edx
lea eax, [esp + 0xcc]
push eax
call fcn.00402c50
push eax
lea ecx, [esp + 0x28]
push ecx
mov byte [esp + 0x118], 0xa
call dword [sym.imp.OLEAUT32.dll_VariantCopyInd]
cmp eax, ebx
jl 0x40c062
mov esi, dword [sym.imp.OLEAUT32.dll_VariantCopy]
lea edx, [esp + 0xc8]
push edx
call esi
lea eax, [esp + 0x78]
push eax
mov byte [esp + 0x114], 2
call esi
cmp word [esp + 0x24], 1
jne 0x40c7f2
mov edx, 0x467455
mov eax, edx
lea esi, [eax + 1]
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x40c420
sub eax, esi
push eax
push edx
lea ecx, [esp + 0x20]
call fcn.00401720
test byte [esp + 0x14], 4
mov dword [esp + 0x110], 2
je 0x40c491
mov eax, dword [esp + 0x40]
and dword [esp + 0x14], 0xfffffffb
cmp eax, ebx
je 0x40c491
mov esi, eax
add eax, 8
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
cmp eax, ebx
jne 0x40c48d
cmp esi, ebx
je 0x40c48d
mov eax, dword [esi]
cmp eax, ebx
je 0x40c474
push eax
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov eax, dword [esi + 4]
cmp eax, ebx
je 0x40c484
push eax
call fcn.004199cf
add esp, 4
push esi
call fcn.004199cf
add esp, 4
mov dword [esp + 0x40], ebx
mov eax, dword [esp + 0x18]
push eax
push 2
push edi
mov ecx, ebp
call fcn.0042e2c9
mov ecx, 8
push str.wzkind
mov word [esp + 0x8c], cx
call fcn.0045a850
mov dword [esp + 0x90], eax
mov ecx, dword [0x77b630]
mov byte [esp + 0x110], 0xc
cmp ecx, ebx
je 0x40c09d
lea edx, [esp + 0x88]
push edx
lea eax, [esp + 0xdc]
push eax
call fcn.00402c50
push eax
lea ecx, [esp + 0x28]
push ecx
mov byte [esp + 0x118], 0xd
call dword [sym.imp.OLEAUT32.dll_VariantCopyInd]
cmp eax, ebx
jl 0x40c062
mov esi, dword [sym.imp.OLEAUT32.dll_VariantCopy]
lea edx, [esp + 0xd8]
push edx
call esi
lea eax, [esp + 0x88]
push eax
mov byte [esp + 0x114], 2
call esi
cmp word [esp + 0x24], 1
jne 0x40c839
mov edx, 0x467455
mov eax, edx
lea esi, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x40c540
sub eax, esi
push eax
push edx
lea ecx, [esp + 0x20]
call fcn.00401720
test byte [esp + 0x14], 8
mov dword [esp + 0x110], 2
je 0x40c5b1
mov eax, dword [esp + 0x38]
and dword [esp + 0x14], 0xfffffff7
cmp eax, ebx
je 0x40c5b1
mov esi, eax
add eax, 8
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
cmp eax, ebx
jne 0x40c5ad
cmp esi, ebx
je 0x40c5ad
mov eax, dword [esi]
cmp eax, ebx
je 0x40c594
push eax
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov eax, dword [esi + 4]
cmp eax, ebx
je 0x40c5a4
push eax
call fcn.004199cf
add esp, 4
push esi
call fcn.004199cf
add esp, 4
mov dword [esp + 0x38], ebx
mov eax, dword [esp + 0x18]
push eax
push 3
push edi
mov ecx, ebp
call fcn.0042e2c9
mov ecx, 8
push str.wzunit
mov word [esp + 0x5c], cx
call fcn.0045a850
mov dword [esp + 0x60], eax
mov ecx, dword [0x77b630]
mov byte [esp + 0x110], 0xf
cmp ecx, ebx
je 0x40c09d
lea edx, [esp + 0x58]
push edx
lea eax, [esp + 0xfc]
push eax
call fcn.00402c50
push eax
lea ecx, [esp + 0x28]
push ecx
mov byte [esp + 0x118], 0x10
call dword [sym.imp.OLEAUT32.dll_VariantCopyInd]
cmp eax, ebx
jl 0x40c062
mov esi, dword [sym.imp.OLEAUT32.dll_VariantCopy]
lea edx, [esp + 0xf8]
push edx
call esi
lea eax, [esp + 0x58]
push eax
mov byte [esp + 0x114], 2
call esi
cmp word [esp + 0x24], 1
jne 0x40c880
mov edx, 0x467455
mov eax, edx
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x40c651
sub eax, esi
push eax
push edx
lea ecx, [esp + 0x20]
call fcn.00401720
test byte [esp + 0x14], 0x10
mov dword [esp + 0x110], 2
je 0x40c6c2
mov eax, dword [esp + 0x3c]
and dword [esp + 0x14], 0xffffffef
cmp eax, ebx
je 0x40c6c2
mov esi, eax
add eax, 8
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
cmp eax, ebx
jne 0x40c6be
cmp esi, ebx
je 0x40c6be
mov eax, dword [esi]
cmp eax, ebx
je 0x40c6a5
push eax
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov eax, dword [esi + 4]
cmp eax, ebx
je 0x40c6b5
push eax
call fcn.004199cf
add esp, 4
push esi
call fcn.004199cf
add esp, 4
mov dword [esp + 0x3c], ebx
mov edi, dword [esp + 0x18]
mov eax, dword [esp + 0x1c]
push edi
push 4
push eax
mov ecx, ebp
call fcn.0042e2c9
mov eax, dword [0x77b630]
cmp eax, ebx
je 0x40c09d
mov ecx, dword [eax]
mov edx, dword [ecx + 0x90]
push eax
mov esi, eax
call edx
cmp eax, ebx
jge 0x40c6ff
push 0x460748
push esi
push eax
call fcn.0045a7d0
mov eax, dword [esp + 0x1c]
inc eax
cmp eax, dword [esp + 0x20]
mov dword [esp + 0x1c], eax
jl 0x40c144
lea eax, [edi - 0x10]
mov byte [esp + 0x110], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40c736
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov esi, dword [sym.imp.OLEAUT32.dll_VariantCopy]
lea ecx, [esp + 0x48]
push ecx
call esi
lea edx, [esp + 0x24]
push edx
call esi
mov ecx, dword [esp + 0x108]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x100
ret
lea ecx, [esp + 0x24]
push ecx
lea ecx, [esp + 0x38]
call fcn.00403110
mov esi, dword [eax]
or dword [esp + 0x14], 1
mov byte [esp + 0x110], 5
cmp esi, ebx
je 0x40c79a
cmp dword [esi + 4], ebx
jne 0x40c795
mov edx, dword [esi]
push edx
call fcn.0045a9d0
mov dword [esi + 4], eax
mov edx, dword [esi + 4]
jmp 0x40c79c
xor edx, edx
cmp edx, ebx
jne 0x40c1dc
xor eax, eax
jmp 0x40c1ea
lea ecx, [esp + 0x24]
push ecx
lea ecx, [esp + 0x48]
call fcn.00403110
mov esi, dword [eax]
or dword [esp + 0x14], 2
mov byte [esp + 0x110], 8
cmp esi, ebx
je 0x40c7e1
cmp dword [esi + 4], ebx
jne 0x40c7dc
mov edx, dword [esi]
push edx
call fcn.0045a9d0
mov dword [esi + 4], eax
mov edx, dword [esi + 4]
jmp 0x40c7e3
xor edx, edx
cmp edx, ebx
jne 0x40c301
xor eax, eax
jmp 0x40c30f
lea ecx, [esp + 0x24]
push ecx
lea ecx, [esp + 0x44]
call fcn.00403110
mov esi, dword [eax]
or dword [esp + 0x14], 4
mov byte [esp + 0x110], 0xb
cmp esi, ebx
je 0x40c828
cmp dword [esi + 4], ebx
jne 0x40c823
mov edx, dword [esi]
push edx
call fcn.0045a9d0
mov dword [esi + 4], eax
mov edx, dword [esi + 4]
jmp 0x40c82a
xor edx, edx
cmp edx, ebx
jne 0x40c415
xor eax, eax
jmp 0x40c429
lea ecx, [esp + 0x24]
push ecx
lea ecx, [esp + 0x3c]
call fcn.00403110
mov esi, dword [eax]
or dword [esp + 0x14], 8
mov byte [esp + 0x110], 0xe
cmp esi, ebx
je 0x40c86f
cmp dword [esi + 4], ebx
jne 0x40c86a
mov edx, dword [esi]
push edx
call fcn.0045a9d0
mov dword [esi + 4], eax
mov edx, dword [esi + 4]
jmp 0x40c871
xor edx, edx
cmp edx, ebx
jne 0x40c538
xor eax, eax
jmp 0x40c549
lea ecx, [esp + 0x24]
push ecx
lea ecx, [esp + 0x40]
call fcn.00403110
mov esi, dword [eax]
or dword [esp + 0x14], 0x10
mov byte [esp + 0x110], 0x11
cmp esi, ebx
je 0x40c8b6
cmp dword [esi + 4], ebx
jne 0x40c8b1
mov edx, dword [esi]
push edx
call fcn.0045a9d0
mov dword [esi + 4], eax
mov edx, dword [esi + 4]
jmp 0x40c8b8
xor edx, edx
cmp edx, ebx
jne 0x40c64c
xor eax, eax
jmp 0x40c65a