Function at 0x51f2a0
Capabilities:
Packed with generic packer

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x64f020
push eax
mov dword fs:[0], esp
sub esp, 0x40
cmp dword [ebp + 0x14], 0x12
push ebx
push esi
push edi
jne 0x51f355
mov edi, dword [ebp + 8]
mov edx, dword [edi + 4]
lea esi, [esp + 0xc]
mov dword [esp + 0xc], 0
call fcn.0041c950
test al, al
je 0x51f569
lea ebx, [ebx]
mov ebx, dword [esp + 0xc]
jmp loc.007d2631
mov edi, dword [ebp + 0x10]
mov ebx, dword [ebp + 0xc]
mov eax, dword [ebp + 8]
call fcn.00521350
mov esi, eax
mov eax, dword [ebp + 8]
call fcn.005213d0
cmp esi, 8
mov edi, eax
mov eax, dword [ebp + 8]
mov edx, dword [eax + 4]
ja 0x51f569
cmp edi, 5
ja 0x51f569
mov ecx, dword [edx + 0x8c]
call fcn.00453840
test al, al
je 0x51f3a9
mov eax, dword [edx + 0x15c]
call fcn.0043c1e0
test al, al
je 0x51f569
push edi
push esi
lea ebx, [esp + 0x18]
call fcn.0040d2a0
mov edi, dword [esp + 0x18]
test edi, edi
jne 0x51f3d8
mov edi, dword [esp + 0x14]
test edi, edi
jne 0x51f3d8
mov edi, dword [esp + 0x1c]
test edi, edi
jne 0x51f3d8
mov edi, dword [esp + 0x10]
test edi, edi
je 0x51f569
mov ecx, dword [edi + 0x13c]
mov edx, dword [ebp + 8]
imul ecx, ecx, 0x58
mov eax, dword [edx]
mov edx, dword [eax + 0x82c]
lea esi, [ecx + edx + 0x358]
call fcn.0051ea30
cmp eax, 1
mov ebx, 0xf
jne 0x51f415
cmp dword [ebp + 0x14], 0xe
jne 0x51f453
push edi
mov edi, dword [ebp + 8]
mov ecx, edi
call fcn.0051e3d0
jmp 0x51f456
cmp eax, 2
jne 0x51f42c
cmp dword [ebp + 0x14], ebx
jne 0x51f453
mov eax, dword [ebp + 8]
push eax
mov esi, edi
call fcn.0051df40
jmp 0x51f453
cmp eax, 3
jne 0x51f43d
cmp dword [ebp + 0x14], 0x10
jne 0x51f453
mov ecx, dword [ebp + 8]
push ecx
jmp 0x51f44c
cmp eax, 4
jne 0x51f453
cmp dword [ebp + 0x14], 0x11
jne 0x51f453
mov edx, dword [ebp + 8]
push edx
mov esi, edi
call fcn.0051e110
mov edi, dword [ebp + 8]
mov eax, dword [edi + 4]
cmp dword [eax + 0x5584], 0x1a
jne 0x51f569
cmp dword [ebp + 0x14], ebx
jne 0x51f569
mov ecx, edi
call fcn.0051e390
test al, al
je 0x51f506
mov ecx, dword [edi]
mov edx, dword [ecx + 0x768]
push str._ADVICE_ZEN_GARDEN_CONTINUE_ADVENTURE_
lea ecx, [esp + 0x14]
mov dword [edx + 0x5584], 0x1b
call fcn.00404450
mov dword [esp + 0x54], 0
mov eax, dword [edi]
mov ebx, dword [eax + 0x768]
mov esi, dword [ebx + 0x140]
mov ecx, 9
lea edx, [esp + 0x10]
call fcn.00459010
lea ecx, [esp + 0x10]
mov dword [ebx + 0x55ec], 0xffffffff
call fcn.00404420
mov ecx, dword [edi + 4]
mov edx, dword [ecx + 0x148]
mov byte [edx + 0x1a], 0
mov eax, dword [edi + 4]
mov ecx, dword [eax + 0x148]
mov byte [ecx + 0xf9], 0
mov ecx, dword [esp + 0x4c]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
mov edx, dword [edi]
mov eax, dword [edx + 0x82c]
cmp dword [eax + 0x1f8], 0x3e8
jne 0x51f569
push str._ADVICE_ZEN_GARDEN_NEED_MORE_FERTILIZER_
lea ecx, [esp + 0x30]
mov dword [eax + 0x1f8], 0x3ed
call fcn.00404450
mov dword [esp + 0x54], 1
mov eax, dword [edi]
mov edi, dword [eax + 0x768]
mov esi, dword [edi + 0x140]
mov ecx, 9
lea edx, [esp + 0x2c]
call fcn.00459010
lea ecx, [esp + 0x2c]
mov dword [edi + 0x55ec], 0xffffffff
call fcn.00404420
mov ecx, dword [esp + 0x4c]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 0x10