Function at 0x40b520
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x144
push ebx
push esi
push edi
mov dword [ebp - 0x11c], 0
cmp dword [0x4129f8], 0
je 0x40b560
push 0x412a1c
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
test eax, eax
je 0x40b560
mov dword [ebp - 0x11c], 1
cmp dword [ebp - 0x11c], 0
jne 0x40b7e5
mov dword [ebp - 0x130], 0
lea eax, [ebp - 0x138]
push eax
lea eax, [ebp - 0x118]
push eax
push 0x118
push 0
push 0x412a2c
push 0
call dword [sym.imp.KERNEL32.dll_SearchPathA]
mov dword [ebp - 0x13c], eax
cmp dword [ebp - 0x13c], 0
je 0x40b5b6
mov dword [ebp - 0x130], 1
cmp dword [ebp - 0x130], 0
jne 0x40b652
push 0x118
lea eax, [ebp - 0x118]
push eax
mov eax, dword [ebp + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
mov dword [ebp - 0x140], eax
cmp dword [ebp - 0x140], 0
je 0x40b652
lea eax, [ebp - 0x118]
push eax
call fcn.0040c258
add esp, 4
mov dword [ebp - 0x12c], eax
cmp dword [ebp - 0x12c], 0
je 0x40b62f
mov eax, dword [ebp - 0x12c]
push eax
call dword [sym.imp.USER32.dll_CharNextA]
mov dword [ebp - 0x144], eax
mov eax, dword [ebp - 0x144]
mov byte [eax], 0
jmp 0x40b636
mov byte [ebp - 0x118], 0
push 0x412a3c
lea eax, [ebp - 0x118]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
mov dword [ebp - 0x130], 1
cmp dword [ebp - 0x130], 0
jne 0x40b669
mov eax, 2
jmp 0x40bb9a
lea eax, [ebp - 0x118]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [0x4129f8], eax
cmp dword [0x4129f8], 0
jne 0x40b694
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x120], eax
cmp dword [0x4129f8], 0
jne 0x40b6ac
mov eax, dword [ebp - 0x120]
jmp 0x40bb9a
push 0xf
mov eax, dword [0x4129f8]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x4129fc], eax
push 0x17
mov eax, dword [0x4129f8]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x412a00], eax
push 0x18
mov eax, dword [0x4129f8]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x412a04], eax
push 0x10
mov eax, dword [0x4129f8]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x412a08], eax
push 0x1a
mov eax, dword [0x4129f8]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x412a0c], eax
push 0x1b
mov eax, dword [0x4129f8]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x412a10], eax
push 0x1d
mov eax, dword [0x4129f8]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x412a14], eax
push 0x1e
mov eax, dword [0x4129f8]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x412a18], eax
cmp dword [0x4129fc], 0
je 0x40b7ac
cmp dword [0x412a00], 0
je 0x40b7ac
cmp dword [0x412a04], 0
je 0x40b7ac
cmp dword [0x412a08], 0
je 0x40b7ac
cmp dword [0x412a0c], 0
je 0x40b7ac
cmp dword [0x412a14], 0
je 0x40b7ac
cmp dword [0x412a18], 0
je 0x40b7ac
cmp dword [0x412a10], 0
jne 0x40b7e5
push 0
push str.Interface_Error
push str.DLL_GetProcAddress_Failure
call dword [sym.imp.USER32.dll_GetFocus]
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
mov eax, dword [0x4129f8]
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov dword [0x4129f8], 0
mov eax, 0x21
jmp 0x40bb9a
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x2c]
mov dword [ecx + 0xc], eax
mov eax, dword [ebp + 0x28]
mov dword [ebp - 0x128], eax
and dword [ebp - 0x128], 0xff0000
mov dword [ebp - 0x134], 0xa0000
mov eax, dword [ebp - 0x134]
cmp dword [ebp - 0x128], eax
je 0x40b856
push 0
push str.OBJ_mismatch
push str.Version_Interface_Incompatible
call dword [sym.imp.USER32.dll_GetFocus]
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
mov eax, dword [0x4129f8]
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov dword [0x4129f8], 0
mov eax, 0x22
jmp 0x40bb9a
push 0
push 0
push 0
push 0
mov eax, dword [ebp + 0x28]
and eax, 0xffff
push eax
mov eax, dword [ebp + 0x28]
shr eax, 0x10
and eax, 0xffff
movzx eax, ax
push eax
mov eax, dword [ebp + 8]
push eax
call dword [0x412a00]
add esp, 0x1c
mov word [ebp - 0x124], ax
test dword [ebp - 0x124], 0xffff
jne 0x40b8ba
mov eax, dword [0x4129f8]
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov dword [0x4129f8], 0
mov eax, 0x23
jmp 0x40bb9a
mov eax, dword [ebp - 0x124]
and eax, 0xffff
push eax
push 0x42
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov ecx, dword [ebp + 0x2c]
mov dword [ecx], eax
mov eax, dword [ebp + 0x2c]
cmp dword [eax], 0
jne 0x40b8ff
mov eax, dword [0x4129f8]
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov dword [0x4129f8], 0
mov eax, 0x24
jmp 0x40bb9a
mov eax, dword [ebp + 0x24]
push eax
mov eax, dword [ebp + 0x18]
push eax
mov eax, dword [ebp + 0xc]
push eax
push 1
push 0
mov eax, dword [ebp + 0x2c]
mov eax, dword [eax]
push eax
mov eax, dword [ebp + 8]
push eax
call dword [0x412a00]
add esp, 0x1c
mov word [ebp - 0x124], ax
test dword [ebp - 0x124], 0xffff
jne 0x40b96e
mov eax, dword [0x4129f8]
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov dword [0x4129f8], 0
mov eax, dword [ebp + 0x2c]
mov eax, dword [eax]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, dword [ebp + 0x2c]
mov dword [eax], 0
mov eax, 0x25
jmp 0x40bb9a
mov eax, dword [ebp + 0x10]
and eax, 0xffff
cmp eax, 0xa
jge 0x40b985
mov word [ebp + 0x10], 0xa
mov eax, dword [ebp + 0x10]
and eax, 0xffff
mov ecx, dword [ebp - 0x124]
and ecx, 0xffff
imul eax, ecx
push eax
push 0x42
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov ecx, dword [ebp + 0x2c]
mov dword [ecx + 4], eax
mov eax, dword [ebp + 0x2c]
cmp dword [eax + 4], 0
jne 0x40b9ed
mov eax, dword [0x4129f8]
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov dword [0x4129f8], 0
mov eax, dword [ebp + 0x2c]
mov eax, dword [eax]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, dword [ebp + 0x2c]
mov dword [eax], 0
mov eax, 0x26
jmp 0x40bb9a
mov eax, dword [ebp + 0x20]
push eax
mov eax, dword [ebp + 0x1c]
push eax
mov eax, dword [ebp + 0x10]
and eax, 0xffff
push eax
push 2
mov eax, dword [ebp + 0x2c]
mov eax, dword [eax + 4]
push eax
mov eax, dword [ebp + 0x2c]
mov eax, dword [eax]
push eax
mov eax, dword [ebp + 8]
push eax
call dword [0x412a00]
add esp, 0x1c
mov word [ebp - 0x124], ax
test dword [ebp - 0x124], 0xffff
jne 0x40ba66
mov eax, dword [0x4129f8]
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov dword [0x4129f8], 0
mov eax, dword [ebp + 0x2c]
mov eax, dword [eax]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, dword [ebp + 0x2c]
mov dword [eax], 0
mov eax, 0x27
jmp 0x40bb9a
cmp dword [ebp + 0x14], 0x100
jae 0x40ba7a
mov dword [ebp + 0x14], 0x100
mov eax, dword [ebp + 0x14]
push eax
push 0x42
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov ecx, dword [ebp + 0x2c]
mov dword [ecx + 8], eax
mov eax, dword [ebp + 0x2c]
cmp dword [eax + 8], 0
jne 0x40bae5
mov eax, dword [0x4129f8]
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov dword [0x4129f8], 0
mov eax, dword [ebp + 0x2c]
mov eax, dword [eax]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, dword [ebp + 0x2c]
mov eax, dword [eax + 4]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, dword [ebp + 0x2c]
mov dword [eax], 0
mov eax, dword [ebp + 0x2c]
mov dword [eax + 4], 0
mov eax, 0x28
jmp 0x40bb9a
push 0
push str.WBDBS32I.DLL
mov eax, dword [ebp + 0x14]
push eax
push 3
mov eax, dword [ebp + 0x2c]
mov eax, dword [eax + 8]
push eax
mov eax, dword [ebp + 0x2c]
mov eax, dword [eax]
push eax
mov eax, dword [ebp + 8]
push eax
call dword [0x412a00]
add esp, 0x1c
mov word [ebp - 0x124], ax
test dword [ebp - 0x124], 0xffff
jne 0x40bb86
mov eax, dword [0x4129f8]
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov dword [0x4129f8], 0
mov eax, dword [ebp + 0x2c]
mov eax, dword [eax]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, dword [ebp + 0x2c]
mov eax, dword [eax + 4]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, dword [ebp + 0x2c]
mov eax, dword [eax + 8]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, dword [ebp + 0x2c]
mov dword [eax], 0
mov eax, dword [ebp + 0x2c]
mov dword [eax + 4], 0
mov eax, dword [ebp + 0x2c]
mov dword [eax + 8], 0
mov eax, 0x29
jmp 0x40bb9a
mov eax, dword [ebp + 0x2c]
mov dword [eax + 0x10], 0
mov eax, 0xffffffff
jmp 0x40bb9a
pop edi
pop esi
pop ebx
leave
ret 0x28