Function at 0x4158c0
Capabilities:
Check os version
Resolve function by parsing pe exports

Disassembly:
push 0xffffffffffffffff
push 0x4ef2c9
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x10c
push ebx
push ebp
push esi
push edi
mov ebp, ecx
xor esi, esi
lea ecx, [esp + 0x14]
mov dword [esp + 0x124], esi
call sub.MFC42.DLL_CString::CString_4
lea ecx, [esp + 0x18]
mov byte [esp + 0x124], 1
call sub.MFC42.DLL_CString::CString_4
push esi
lea ecx, [esp + 0x110]
mov byte [esp + 0x128], 2
call fcn.0044e9a0
push esi
lea ecx, [esp + 0x3c]
mov byte [esp + 0x128], 3
call fcn.0044e9a0
push esi
lea ecx, [esp + 0x54]
mov byte [esp + 0x128], 4
call fcn.0044e9a0
lea ecx, [esp + 0x70]
mov byte [esp + 0x124], 5
call fcn.0044a000
lea eax, [esp + 0x1c]
push 1
push eax
mov byte [esp + 0x12c], 6
call fcn.0040dc50
add esp, 8
lea ecx, [esp + 0x10]
mov byte [esp + 0x124], 7
mov dword [esp + 0x30], esi
call sub.MFC42.DLL_CString::CString_4
push esi
lea ecx, [esp + 0x130]
mov byte [esp + 0x128], 8
call sub.MFC42.DLL_CString::GetBuffer
mov cl, byte [esp + 0x37]
mov edx, eax
mov byte [esp + 0x20], cl
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
mov dword [esp + 0x24], esi
mov dword [esp + 0x28], esi
mov dword [esp + 0x2c], esi
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push edx
lea ecx, [esp + 0x28]
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::assign_char_const___unsigned_int_]
lea edx, [esp + 0x10c]
push 1
lea eax, [esp + 0x24]
push edx
push eax
lea ecx, [esp + 0x7c]
mov byte [esp + 0x130], 9
call fcn.0044a090
test al, al
mov eax, dword [esp + 0x24]
mov byte [esp + 0x124], 8
sete bl
cmp eax, esi
je 0x415a0f
lea ecx, [eax - 1]
mov al, byte [eax - 1]
test al, al
je 0x415a06
cmp al, 0xff
je 0x415a06
dec al
mov byte [ecx], al
jmp 0x415a0f
push ecx
call sub.MFC42.DLL_operatordelete
add esp, 4
test bl, bl
je 0x415adf
lea ecx, [esp + 0x10]
mov byte [esp + 0x124], 7
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x1c]
mov byte [esp + 0x124], 6
call sub.MFC42.DLL_CString::CString
push 1
lea ecx, [esp + 0xf8]
mov byte [esp + 0x128], 0xc
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
push 1
lea ecx, [esp + 0xd4]
mov byte [esp + 0x128], 0xb
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
mov eax, dword [esp + 0xcc]
mov byte [esp + 0x124], 0xa
cmp eax, esi
je 0x415a8f
lea ecx, [esp + 0xa0]
call fcn.0042c1b0
cmp dword [esp + 0xcc], esi
jne 0x415a7a
mov eax, dword [esp + 0x9c]
mov byte [esp + 0x124], 5
cmp eax, esi
je 0x415efc
mov ecx, dword [esp + 0x7c]
mov eax, dword [esp + 0x9c]
add ecx, 4
dec eax
mov dword [esp + 0x7c], ecx
mov dword [esp + 0x9c], eax
je 0x415ac8
cmp ecx, dword [esp + 0x78]
jne 0x415ad1
lea ecx, [esp + 0x70]
call fcn.0042c550
cmp dword [esp + 0x9c], esi
jne 0x415aa6
jmp 0x415efc
push 0xffffffffffffffff
lea ecx, [esp + 0x130]
call sub.MFC42.DLL_CString::ReleaseBuffer
push str.crop
lea ecx, [esp + 0x110]
call fcn.0044fea0
push eax
lea ecx, [esp + 0x54]
call fcn.0044f040
lea ecx, [esp + 0x50]
call fcn.0044f140
cmp eax, 6
je 0x415bc0
lea ecx, [esp + 0x10]
mov byte [esp + 0x124], 7
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x1c]
mov byte [esp + 0x124], 6
call sub.MFC42.DLL_CString::CString
push 1
lea ecx, [esp + 0xf8]
mov byte [esp + 0x128], 0xf
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
push 1
lea ecx, [esp + 0xd4]
mov byte [esp + 0x128], 0xe
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
mov eax, dword [esp + 0xcc]
mov byte [esp + 0x124], 0xd
cmp eax, esi
je 0x415b92
lea ecx, [esp + 0xa0]
call fcn.0042c1b0
cmp dword [esp + 0xcc], esi
jne 0x415b7d
mov eax, dword [esp + 0x9c]
mov byte [esp + 0x124], 5
cmp eax, esi
je 0x415efc
lea ecx, [esp + 0x70]
call fcn.0042c120
cmp dword [esp + 0x9c], esi
jne 0x415ba9
jmp 0x415efc
mov ecx, dword [ebp + 0x9b8]
xor eax, eax
cmp ecx, esi
jle 0x415be9
xor ecx, ecx
mov edx, dword [ebp + 0x9b4]
inc eax
mov dword [edx + ecx + 0x4c], esi
mov edx, dword [ebp + 0x9b8]
add ecx, 0x84
cmp eax, edx
jl 0x415bce
xor ebx, ebx
lea ecx, [esp + 0x50]
mov dword [esp + 0x48], ebx
call fcn.0044fc80
test eax, eax
jbe 0x415dfd
push ebx
lea ecx, [esp + 0x54]
call fcn.0044fd30
push eax
lea ecx, [esp + 0x3c]
call fcn.0044f040
lea ecx, [esp + 0x38]
call fcn.0044f140
cmp eax, 7
jne 0x415e5f
push 0x5261ac
lea ecx, [esp + 0x3c]
call fcn.0044fea0
push eax
call fcn.0040c7d0
mov edi, eax
mov eax, dword [ebp + 0x9b8]
add esp, 4
cmp edi, eax
jae 0x415de7
push str.cName
lea ecx, [esp + 0x3c]
call fcn.0044fea0
push eax
lea eax, [esp + 0x10c]
push eax
call fcn.0040c8b0
add esp, 8
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x128], 0x13
call sub.MFC42.DLL_CString::operator_2
lea ecx, [esp + 0x108]
mov byte [esp + 0x124], 8
call sub.MFC42.DLL_CString::CString
push str.price
lea ecx, [esp + 0x3c]
call fcn.0044fea0
push eax
call fcn.0040c7d0
add esp, 4
lea ecx, [esp + 0x38]
mov ebx, eax
push str.level
call fcn.0044fea0
push eax
call fcn.0040c7d0
mov ecx, dword [ebp + 0x9b4]
mov esi, edi
shl esi, 5
mov edx, dword [esp + 0x14]
add esi, edi
shl esi, 2
mov dword [esp + 0x50], eax
push edx
lea eax, [ecx + esi + 0x1c]
mov eax, dword [ecx + esi + 0x1c]
push eax
call dword [sym.imp.MSVCRT.dll__mbscmp]
add esp, 0xc
test eax, eax
jne 0x415d0a
mov eax, dword [ebp + 0x9b4]
add eax, esi
cmp dword [eax + 0x34], ebx
jne 0x415d0a
mov ecx, dword [esp + 0x4c]
mov edx, dword [eax + 0x3c]
cmp edx, ecx
je 0x415d8b
mov eax, dword [ebp + 0x9b4]
lea edx, [esp + 0x10]
push edx
lea ecx, [eax + esi + 0x1c]
call sub.MFC42.DLL_CString::operator_2
mov ecx, dword [ebp + 0x9b4]
mov eax, dword [esp + 0x4c]
push edi
push 0x5231b8
mov dword [ecx + esi + 0x34], ebx
mov edx, dword [ebp + 0x9b4]
lea ecx, [esp + 0x20]
push ecx
mov dword [edx + esi + 0x3c], eax
call sub.MFC42.DLL_CString::Format
mov edx, dword [ebp + 0x9b4]
add esp, 0xc
mov ecx, dword [edx + esi + 0x1c]
lea eax, [edx + esi]
push ecx
lea ecx, [esp + 0x18]
mov edx, dword [eax + 0x34]
mov eax, dword [eax + 0x3c]
push edx
push eax
push str._d__d__s
push ecx
call sub.MFC42.DLL_CString::Format
mov edx, dword [esp + 0x30]
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x2c]
add esp, 0x14
push edx
push eax
push ecx
push str.PLANTS
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
push str.amount
lea ecx, [esp + 0x3c]
call fcn.0044fea0
push eax
call fcn.0040c7d0
mov edx, dword [ebp + 0x9b4]
add esp, 4
lea ecx, [esp + 0x38]
push str.isLock
mov dword [edx + esi + 0x4c], eax
call fcn.0044fea0
push eax
call fcn.0040c7d0
mov ecx, dword [ebp + 0x9b4]
mov ebx, dword [esp + 0x4c]
add esp, 4
mov dword [ecx + esi + 0x18], eax
mov edx, dword [ebp + 0x9b4]
mov ecx, dword [esp + 0x30]
mov eax, dword [edx + esi + 0x4c]
add ecx, eax
xor esi, esi
mov dword [esp + 0x30], ecx
inc ebx
lea ecx, [esp + 0x50]
mov dword [esp + 0x48], ebx
call fcn.0044fc80
cmp ebx, eax
jb 0x415c00
mov ecx, dword [esp + 0x30]
mov byte [esp + 0x124], 7
mov dword [ebp + 0xbc], ecx
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x1c]
mov byte [esp + 0x124], 6
call sub.MFC42.DLL_CString::CString
mov eax, dword [esp + 0xf8]
mov byte [esp + 0x124], 0x14
cmp eax, esi
je 0x415f7b
lea ecx, [eax - 1]
mov al, byte [eax - 1]
test al, al
je 0x415f72
cmp al, 0xff
je 0x415f72
dec al
mov byte [ecx], al
jmp 0x415f7b
lea ecx, [esp + 0x10]
mov byte [esp + 0x124], 7
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x1c]
mov byte [esp + 0x124], 6
call sub.MFC42.DLL_CString::CString
push 1
lea ecx, [esp + 0xf8]
mov byte [esp + 0x128], 0x12
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
push 1
lea ecx, [esp + 0xd4]
mov byte [esp + 0x128], 0x11
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
mov eax, dword [esp + 0xcc]
mov byte [esp + 0x124], 0x10
cmp eax, esi
je 0x415ed7
lea ecx, [esp + 0xa0]
call fcn.0042c1b0
cmp dword [esp + 0xcc], esi
jne 0x415ec2
mov eax, dword [esp + 0x9c]
mov byte [esp + 0x124], 5
cmp eax, esi
je 0x415efc
lea ecx, [esp + 0x70]
call fcn.0042c120
cmp dword [esp + 0x9c], esi
jne 0x415eea
lea ecx, [esp + 0x50]
mov byte [esp + 0x124], 4
call fcn.0044eec0
lea ecx, [esp + 0x38]
mov byte [esp + 0x124], 3
call fcn.0044eec0
lea ecx, [esp + 0x10c]
mov byte [esp + 0x124], 2
call fcn.0044eec0
lea ecx, [esp + 0x18]
mov byte [esp + 0x124], 1
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x14]
mov byte [esp + 0x124], 0
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x12c]
mov dword [esp + 0x124], 0xffffffff
call sub.MFC42.DLL_CString::CString
xor eax, eax
jmp 0x416278
push ecx
call sub.MFC42.DLL_operatordelete
add esp, 4
mov eax, dword [esp + 0xd4]
mov dword [esp + 0xf8], esi
cmp eax, esi
mov dword [esp + 0xfc], esi
mov dword [esp + 0x100], esi
je 0x415fb8
lea ecx, [eax - 1]
mov al, byte [eax - 1]
test al, al
je 0x415faf
cmp al, 0xff
je 0x415faf
dec al
mov byte [ecx], al
jmp 0x415fb8
push ecx
call sub.MFC42.DLL_operatordelete
add esp, 4
mov eax, dword [esp + 0xcc]
mov dword [esp + 0xd4], esi
cmp eax, esi
mov dword [esp + 0xd8], esi
mov dword [esp + 0xdc], esi
je 0x4160f7
mov eax, dword [esp + 0xac]
push esi
mov ecx, eax
add eax, 0x20
mov dword [esp + 0xb0], eax
call fcn.0042c6f0
mov eax, dword [esp + 0xcc]
dec eax
mov dword [esp + 0xcc], eax
je 0x41601c
mov edx, dword [esp + 0xac]
mov eax, dword [esp + 0xa8]
cmp edx, eax
jne 0x4160ea
mov eax, dword [esp + 0xb0]
mov ecx, eax
add eax, 4
mov dword [esp + 0xb0], eax
mov ecx, dword [ecx]
push ecx
call sub.MFC42.DLL_operatordelete
mov eax, dword [esp + 0xd0]
add esp, 4
cmp eax, esi
jne 0x4160aa
lea ecx, [esp + 0x20]
call fcn.004051c0
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x28]
mov esi, dword [esp + 0x2c]
mov dword [esp + 0xa4], eax
mov dword [esp + 0xb4], eax
mov eax, dword [esp + 0xc4]
mov dword [esp + 0xa8], ecx
push eax
mov dword [esp + 0xb0], edx
mov dword [esp + 0xb4], esi
mov dword [esp + 0xbc], ecx
mov dword [esp + 0xc0], edx
mov dword [esp + 0xc4], esi
call sub.MFC42.DLL_operatordelete
add esp, 4
xor esi, esi
jmp 0x4160ea
mov eax, dword [esp + 0xb0]
push eax
mov ecx, dword [eax]
push ecx
lea ecx, [esp + 0x68]
call fcn.0042c610
mov ecx, dword [esp + 0x60]
mov edx, dword [esp + 0x64]
mov eax, dword [esp + 0x68]
mov dword [esp + 0xa4], ecx
mov ecx, dword [esp + 0x6c]
mov dword [esp + 0xa8], edx
mov dword [esp + 0xac], eax
mov dword [esp + 0xb0], ecx
cmp dword [esp + 0xcc], esi
jne 0x415fdc
mov eax, dword [esp + 0x9c]
mov byte [esp + 0x124], 5
cmp eax, esi
je 0x416204
mov ecx, dword [esp + 0x7c]
mov eax, dword [esp + 0x9c]
add ecx, 4
dec eax
mov dword [esp + 0x7c], ecx
mov dword [esp + 0x9c], eax
je 0x416138
mov eax, dword [esp + 0x78]
mov edx, ecx
cmp edx, eax
jne 0x4161f7
mov ecx, dword [esp + 0x80]
mov eax, ecx
add ecx, 4
mov dword [esp + 0x80], ecx
mov eax, dword [eax]
push eax
call sub.MFC42.DLL_operatordelete
mov eax, dword [esp + 0xa0]
add esp, 4
cmp eax, esi
jne 0x4161c0
lea ecx, [esp + 0x60]
call fcn.004051c0
mov eax, dword [esp + 0x60]
mov ecx, dword [esp + 0x64]
mov edx, dword [esp + 0x68]
mov esi, dword [esp + 0x6c]
mov dword [esp + 0x74], eax
mov dword [esp + 0x84], eax
mov eax, dword [esp + 0x94]
mov dword [esp + 0x78], ecx
push eax
mov dword [esp + 0x80], edx
mov dword [esp + 0x84], esi
mov dword [esp + 0x8c], ecx
mov dword [esp + 0x90], edx
mov dword [esp + 0x94], esi
call sub.MFC42.DLL_operatordelete
add esp, 4
xor esi, esi
jmp 0x4161f7
mov eax, dword [esp + 0x80]
push eax
mov ecx, dword [eax]
push ecx
lea ecx, [esp + 0x28]
call fcn.0042c610
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x28]
mov dword [esp + 0x74], ecx
mov ecx, dword [esp + 0x2c]
mov dword [esp + 0x78], edx
mov dword [esp + 0x7c], eax
mov dword [esp + 0x80], ecx
cmp dword [esp + 0x9c], esi
jne 0x41610e
lea ecx, [esp + 0x50]
mov byte [esp + 0x124], 4
call fcn.0044eec0
lea ecx, [esp + 0x38]
mov byte [esp + 0x124], 3
call fcn.0044eec0
lea ecx, [esp + 0x10c]
mov byte [esp + 0x124], 2
call fcn.0044eec0
lea ecx, [esp + 0x18]
mov byte [esp + 0x124], 1
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x14]
mov byte [esp + 0x124], 0
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x12c]
mov dword [esp + 0x124], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov eax, 1
mov ecx, dword [esp + 0x11c]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x118
ret 4