Function at 0x401470
Capabilities:
Get system information on windows
Link many functions at runtime

Disassembly:
sub esp, 0x224
mov eax, dword [0x41b250]
xor eax, esp
mov dword [esp + 0x220], eax
cmp dword [0x41bec0], 0
mov eax, dword [esp + 0x22c]
mov ecx, dword [esp + 0x23c]
mov edx, dword [esp + 0x240]
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
push ebp
push esi
mov esi, dword [esp + 0x25c]
push edi
mov edi, dword [esp + 0x238]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x254]
mov dword [esp + 0x20], ecx
mov ecx, dword [esp + 0x258]
mov dword [esp + 0x14], edi
mov dword [esp + 0x24], edx
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], ecx
je 0x4014ef
push str.WBDWA44I.DLL
call ebx
test eax, eax
jne 0x4016b9
mov edi, dword [sym.imp.KERNEL32.dll_SetErrorMode]
push 0x8000
call edi
push str.WBDWA44I.DLL
mov ebp, eax
call ebx
push ebp
mov dword [0x41bec0], eax
call edi
mov ecx, dword [0x41bec0]
test ecx, ecx
jne 0x4015b1
lea edx, [esp + 0x28]
push edx
lea eax, [esp + 0x54]
push eax
push 0x118
push ecx
push str.WBDWA44I.DLL
push ecx
call dword [sym.imp.KERNEL32.dll_SearchPathA]
test eax, eax
jne 0x40158a
mov edx, dword [esp + 0x10]
push 0x118
lea ecx, [esp + 0x54]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
je 0x4016ab
lea eax, [esp + 0x50]
push eax
call fcn.00401310
add esp, 4
test eax, eax
je 0x401575
push eax
call dword [sym.imp.USER32.dll_CharNextA]
mov byte [eax], 0
jmp 0x40157a
mov byte [esp + 0x50], 0
push str.WBDWA44I.DLL
lea ecx, [esp + 0x54]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcatA]
lea edx, [esp + 0x50]
push edx
call ebx
mov ecx, eax
mov dword [0x41bec0], ecx
test ecx, ecx
jne 0x4015b1
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [0x41bec0]
test ecx, ecx
je 0x401a3a
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0xf
push ecx
call edi
mov dword [0x41bec4], eax
mov eax, dword [0x41bec0]
push 0x17
push eax
call edi
mov ecx, dword [0x41bec0]
push 0x18
push ecx
mov dword [0x41bec8], eax
call edi
mov edx, dword [0x41bec0]
push 0x10
push edx
mov dword [0x41becc], eax
call edi
mov dword [0x41bed0], eax
mov eax, dword [0x41bec0]
push 0x1a
push eax
call edi
mov ecx, dword [0x41bec0]
push 0x1b
push ecx
mov dword [0x41bed4], eax
call edi
mov edx, dword [0x41bec0]
push 0x1d
push edx
mov dword [0x41bed8], eax
call edi
mov dword [0x41bedc], eax
mov eax, dword [0x41bec0]
push 0x1e
push eax
call edi
cmp dword [0x41bec4], 0
mov dword [0x41bee0], eax
je 0x401671
cmp dword [0x41bec8], 0
je 0x401671
cmp dword [0x41becc], 0
je 0x401671
cmp dword [0x41bed0], 0
je 0x401671
cmp dword [0x41bed4], 0
je 0x401671
cmp dword [0x41bedc], 0
je 0x401671
test eax, eax
je 0x401671
cmp dword [0x41bed8], 0
jne 0x4016b5
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 ecx, dword [0x41bec0]
push ecx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov dword [0x41bec0], 0
mov eax, 0x21
jmp 0x401a3a
mov eax, 2
jmp 0x401a3a
mov edi, dword [esp + 0x14]
mov eax, dword [esp + 0x25c]
mov edx, dword [esp + 0x10]
mov ecx, eax
and ecx, 0xff0000
mov dword [esi + 0xc], edx
push 0
cmp ecx, 0xa0000
je 0x401711
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 edx, dword [0x41bec0]
push edx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov dword [0x41bec0], 0
mov eax, 0x22
jmp 0x401a3a
push 0
push 0
movzx ecx, ax
push 0
push ecx
shr eax, 0x10
push eax
push edi
call dword [0x41bec8]
add esp, 0x1c
test eax, eax
jne 0x40174e
mov edx, dword [0x41bec0]
push edx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov dword [0x41bec0], 0
mov eax, 0x23
jmp 0x401a3a
mov ebp, dword [sym.imp.KERNEL32.dll_GlobalAlloc]
push eax
push 0x42
call ebp
xor ebx, ebx
mov dword [esi], eax
cmp eax, ebx
jne 0x40177b
mov eax, dword [0x41bec0]
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov dword [0x41bec0], ebx
lea eax, [ebx + 0x24]
jmp 0x401a3a
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x20]
push ecx
mov ecx, dword [esp + 0x14]
push edx
push ecx
push 1
push ebx
push eax
push edi
call dword [0x41bec8]
add esp, 0x1c
cmp eax, ebx
jne 0x4017c4
mov edx, dword [0x41bec0]
push edx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov dword [0x41bec0], ebx
mov eax, dword [esi]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov dword [esi], ebx
mov eax, 0x25
jmp 0x401a3a
mov ecx, dword [esp + 0x240]
cmp cx, 0xa
jae 0x4017d6
mov ecx, 0xa
movzx edi, cx
mov ecx, edi
imul ecx, eax
push ecx
push 0x42
call ebp
xor ebx, ebx
mov dword [esi + 4], eax
cmp eax, ebx
jne 0x401812
mov edx, dword [0x41bec0]
push edx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov dword [0x41bec0], ebx
mov eax, dword [esi]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov dword [esi], ebx
lea eax, [ebx + 0x26]
jmp 0x401a3a
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x24]
push ecx
mov ecx, dword [esp + 0x18]
push edx
push edi
push 2
push eax
mov eax, dword [esi]
push eax
push ecx
call dword [0x41bec8]
add esp, 0x1c
test eax, eax
jne 0x40185d
mov edx, dword [0x41bec0]
push edx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov dword [0x41bec0], ebx
mov eax, dword [esi]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov dword [esi], ebx
mov eax, 0x27
jmp 0x401a3a
mov edi, dword [esp + 0x248]
cmp edi, 0x100
jae 0x401871
mov edi, 0x100
lea ecx, [esp + 0x2c]
push ecx
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov ecx, dword [esp + 0x30]
xor edx, edx
mov eax, edi
div ecx
mov eax, ecx
mov ebp, dword [sym.imp.KERNEL32.dll_VirtualAlloc]
sub eax, edx
xor edx, edx
div ecx
add edx, edi
mov edi, dword [esp + 0x244]
mov dword [esi + 0x1a4], edx
push 1
push 0x2000
push edi
push 0
call ebp
mov dword [esi + 8], eax
test eax, eax
jne 0x401947
shr edi, 1
cmp edi, dword [esi + 0x1a4]
jb 0x4018ca
inc ebx
cmp ebx, 5
jl 0x4018a3
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [0x41bec0]
push edx
mov ebp, eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov ebx, dword [sym.imp.KERNEL32.dll_GlobalFree]
mov dword [0x41bec0], 0
mov eax, dword [esi]
push eax
call ebx
mov ecx, dword [esi + 4]
push ecx
call ebx
push ebp
lea edx, [esp + 0x16c]
push str.VirtualAlloc_returned__ld
push edx
mov dword [esi], 0
mov dword [esi + 4], 0
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
push 0
push str.DoDaBatStart_error
lea eax, [esp + 0x170]
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
cmp edi, dword [esi + 0x1a4]
sbb eax, eax
neg eax
add eax, 0x28
jmp 0x401a3a
mov ecx, dword [esi + 0x1a4]
push 4
push 0x1000
push ecx
push eax
mov dword [esi + 0x1a8], edi
call ebp
xor ebx, ebx
mov dword [esi + 8], eax
cmp eax, ebx
jne 0x4019c9
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [0x41bec0]
push edx
mov edi, eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov ebp, dword [sym.imp.KERNEL32.dll_GlobalFree]
mov dword [0x41bec0], ebx
mov eax, dword [esi]
push eax
call ebp
mov ecx, dword [esi + 4]
push ecx
call ebp
push edi
lea edx, [esp + 0x16c]
push str.VirtualAlloc_returned__ld
push edx
mov dword [esi], ebx
mov dword [esi + 4], ebx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
push ebx
push str.DoDaBatStart_error
lea eax, [esp + 0x170]
push eax
push ebx
call dword [sym.imp.USER32.dll_MessageBoxA]
lea eax, [ebx + 0x2a]
jmp 0x401a3a
mov ecx, dword [esi + 0x1a4]
mov edx, dword [esi]
push esi
push str.WBDWA44I.DLL
push ecx
push 3
push eax
mov eax, dword [esp + 0x28]
push edx
push eax
call dword [0x41bec8]
add esp, 0x1c
test eax, eax
jne 0x401a27
mov ecx, dword [0x41bec0]
push ecx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov edi, dword [sym.imp.KERNEL32.dll_GlobalFree]
mov dword [0x41bec0], ebx
mov edx, dword [esi]
push edx
call edi
mov eax, dword [esi + 4]
push eax
call edi
mov ecx, dword [esi + 8]
push ecx
call edi
mov dword [esi], ebx
mov dword [esi + 4], ebx
mov dword [esi + 8], ebx
mov eax, 0x2b
jmp 0x401a3a
mov dword [esi + 0x10], ebx
add dword [0x41bee8], 1
adc dword [0x41beec], ebx
or eax, 0xffffffff
mov ecx, dword [esp + 0x230]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0040fa05
add esp, 0x224
ret 0x2c