Function at 0x446960
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5dedb0
mov eax, dword fs:[0]
push eax
sub esp, 0x88
mov eax, dword [0x66c0e0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
call fcn.004b5c24
xor ecx, ecx
xor esi, esi
cmp eax, esi
setne cl
cmp ecx, esi
jne 0x4469ac
push 0x80004005
call fcn.004047e0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x78], eax
mov edx, dword [ebx]
mov eax, dword [edx + 0x6c]
mov ecx, ebx
mov dword [ebp - 4], esi
call eax
cmp eax, esi
je 0x446d0e
mov ecx, dword [eax + 4]
push 4
push ecx
call dword [sym.imp.USER32.dll_GetSubMenu]
push eax
call fcn.004bfa76
mov dword [ebp - 0x88], eax
cmp eax, esi
jne 0x446a0a
mov eax, dword [ebp - 0x78]
add eax, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jmp 0x446d24
push str.ledtoolex.dll
lea ecx, [ebp - 0x78]
push ecx
mov ecx, 0x66d9e8
mov dword [ebp - 0x8c], esi
call fcn.0043fe60
mov edx, dword [ebp - 0x78]
push edx
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
test edi, edi
je 0x446ade
push str.Ledtool_GetTypeCount
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.Ledtool_GetTypeAndName
push edi
mov dword [ebp - 0x84], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ecx, dword [ebp - 0x84]
mov dword [ebp - 0x80], eax
test ecx, ecx
je 0x446ad7
test eax, eax
je 0x446ad7
call ecx
mov dword [ebp - 0x7c], eax
test eax, eax
je 0x446ad7
lea ecx, [ebx + 0x69c]
call fcn.004bfb05
call dword [sym.imp.USER32.dll_CreateMenu]
push eax
lea ecx, [ebx + 0x69c]
call fcn.004bfaab
cmp dword [ebp - 0x7c], 0
mov dword [ebp - 0x8c], 1
jle 0x446ad7
lea esp, [esp]
cmp esi, 0x10
jge 0x446ad7
movzx ecx, word [0x66dae8]
push 0x64
lea eax, [ebp - 0x74]
push eax
push esi
push ecx
call dword [ebp - 0x80]
mov ecx, dword [ebx + 0x6a0]
lea edx, [ebp - 0x74]
push edx
lea eax, [esi + 0x8083]
push eax
push 0
push ecx
call dword [sym.imp.USER32.dll_AppendMenuA]
inc esi
cmp esi, dword [ebp - 0x7c]
jl 0x446aa0
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push str.ledtool.dll
lea edx, [ebp - 0x78]
push edx
mov ecx, 0x66d9e8
mov dword [0x66daf4], esi
call fcn.0043fe60
mov eax, dword [ebp - 0x78]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
mov dword [ebp - 0x94], edi
test edi, edi
je 0x446d0e
push str.Ledtool_GetTypeCount
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.Ledtool_GetTypeAndName
push edi
mov dword [ebp - 0x80], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.Ledtool_SearchCard
push edi
mov dword [ebp - 0x84], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x90], eax
mov eax, dword [ebp - 0x80]
test eax, eax
je 0x446cbf
cmp dword [ebp - 0x84], 0
je 0x446cbf
call eax
mov dword [ebp - 0x7c], eax
test eax, eax
je 0x446cbf
cmp dword [ebp - 0x8c], 0
jne 0x446b8f
lea ecx, [ebx + 0x69c]
call fcn.004bfb05
call dword [sym.imp.USER32.dll_CreateMenu]
push eax
lea ecx, [ebx + 0x69c]
call fcn.004bfaab
xor edi, edi
cmp dword [ebp - 0x7c], edi
jle 0x446bd1
cmp esi, 0x10
jge 0x446bd1
movzx edx, word [0x66dae8]
push 0x64
lea ecx, [ebp - 0x74]
push ecx
push edi
push edx
call dword [ebp - 0x84]
mov edx, dword [ebx + 0x6a0]
lea eax, [ebp - 0x74]
push eax
lea ecx, [esi + 0x8083]
push ecx
push 0
push edx
call dword [sym.imp.USER32.dll_AppendMenuA]
inc edi
inc esi
cmp edi, dword [ebp - 0x7c]
jl 0x446b96
cmp dword [ebx + 0x3ac], 0
mov esi, dword [sym.imp.USER32.dll_AppendMenuA]
je 0x446c74
mov eax, dword [ebx + 0x6a0]
push 0
push 0
push 0x800
push eax
call esi
lea ecx, [ebp - 0x78]
push ecx
push 0x8073
mov ecx, 0x66d9e8
call fcn.00440520
mov ecx, dword [ebp - 0x78]
cmp dword [ecx - 0xc], 0
jl 0x446c63
push 0x5fa3fc
push ecx
call fcn.005be869
mov ecx, dword [ebp - 0x78]
add esp, 8
test eax, eax
je 0x446c63
sub eax, ecx
mov edx, eax
js 0x446c63
mov eax, dword [ecx - 0xc]
lea edi, [edx + 1]
cmp eax, edi
jle 0x446c63
sub eax, edx
dec eax
push eax
lea edx, [ebp - 0x80]
push edx
lea ecx, [ebp - 0x78]
call fcn.00414bc0
push eax
lea ecx, [ebp - 0x78]
mov byte [ebp - 4], 1
call fcn.00406510
lea ecx, [ebp - 0x80]
mov byte [ebp - 4], 0
call fcn.004273a0
mov ecx, dword [ebp - 0x78]
mov eax, dword [ebx + 0x6a0]
push ecx
push 0x8073
push 0
push eax
call esi
mov edi, dword [ebp - 0x88]
mov ecx, dword [edi + 4]
push 0
push 0
push 0x800
push ecx
call esi
lea edx, [ebp - 0x78]
push edx
push 0x186
mov ecx, 0x66d9e8
call fcn.00440520
add ebx, 0x69c
je 0x446ca7
mov ebx, dword [ebx + 4]
mov eax, dword [ebp - 0x78]
mov ecx, dword [edi + 4]
push eax
push ebx
push 0x410
push ecx
call esi
mov edi, dword [ebp - 0x94]
jmp 0x446cc5
mov esi, dword [sym.imp.USER32.dll_AppendMenuA]
cmp dword [ebp - 0x90], 0
je 0x446d07
mov ebx, dword [ebp - 0x88]
mov edx, dword [ebx + 4]
push 0
push 0
push 0x800
push edx
call esi
lea eax, [ebp - 0x78]
push eax
push 0x1f0
mov ecx, 0x66d9e8
call fcn.00440520
mov ecx, dword [ebp - 0x78]
mov edx, dword [ebx + 4]
push ecx
push 0x8093
push 0
push edx
call esi
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, dword [ebp - 0x78]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
mov dword [ebp - 4], edx
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x446d30
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.005bb30e
mov esp, ebp
pop ebp
ret