Function at 0x4260b0
Capabilities:
Check os version
Get number of processors

Disassembly:
push 0xffffffffffffffff
push 0x48c3f9
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x3b0
push ebx
push ebp
push esi
push edi
mov ebp, ecx
mov ecx, dword [ebp + 0x21b4]
mov eax, dword [esp + 0x3d0]
xor esi, esi
mov edx, dword [ecx + eax*4]
mov ecx, ebp
push edx
push eax
mov dword [esp + 0x3d0], esi
call fcn.00422320
mov ebx, dword [sym.imp.MSVCRT.dll_atoi]
mov dword [esp + 0x30], esi
mov esi, dword [sym.imp.Staff2.dll_class_CString___cdecl_STAFFGetFirstWord_class_CString___char_const___char___int_]
mov edi, dword [sym.imp.MSVCRT.dll__mbsicmp]
push 1
push 0
lea eax, [esp + 0x3dc]
push 0x49b0b0
lea ecx, [esp + 0x20]
push eax
push ecx
call esi
push 1
push 0
lea edx, [esp + 0x30]
push 0x49b09c
lea eax, [esp + 0x30]
push edx
push eax
mov byte [esp + 0x3f0], 1
call esi
mov ecx, dword [esp + 0x38]
push str.ChatOneByCode
push ecx
mov byte [esp + 0x3f8], 2
call edi
add esp, 0x30
test eax, eax
jne 0x4265c7
push 1
push eax
lea edx, [esp + 0x1c]
push 0x49b09c
lea eax, [esp + 0x2c]
push edx
push eax
call esi
push 1
push 0
lea ecx, [esp + 0x30]
push 0x49b09c
lea edx, [esp + 0x110]
push ecx
push edx
mov byte [esp + 0x3f0], 3
call esi
mov eax, dword [eax]
push eax
call ebx
add esp, 0x2c
lea ecx, [esp + 0xf0]
mov ebx, eax
call fcn.00489b20
mov eax, dword [esp + 0x20]
push str._NPCID
push eax
call edi
add esp, 8
test eax, eax
jne 0x4261ca
lea ecx, [ebp + 0x41cc]
push ecx
lea ecx, [esp + 0x24]
call sub.MFC42.DLL_CString::operator
mov edx, dword [esp + 0x20]
xor edi, edi
cmp dword [edx - 8], edi
je 0x4265b1
lea esi, [ebx - 0x88]
cmp esi, 0xe
ja case.0x4261f0.141
xor eax, eax
mov al, byte [esi + 0x4281ac]
jmp dword [eax*4 + 0x428194]
lea ecx, [esp + 0x28]
lea edx, [esp + 0x1c]
or esi, 0xffffffff
push ecx
push edx
mov ecx, ebp
mov dword [esp + 0x24], esi
mov dword [esp + 0x30], esi
call fcn.00428800
cmp eax, 1
jne 0x4265b1
mov ecx, dword [esp + 0x1c]
cmp cx, si
je 0x4265b1
mov eax, dword [esp + 0x28]
cmp ax, si
je 0x4265b1
mov word [ebp + 0x41f6], cx
mov dword [esp + 0x18], edi
mov word [ebp + 0x41f4], ax
mov word [esp + 0x18], ax
mov word [esp + 0x1a], cx
mov ecx, dword [esp + 0x20]
lea eax, [esp + 0x18]
push 4
push eax
push ecx
jmp 0x4265a7
mov cx, word [ebp + 0x41f6]
cmp cx, 0xffff
je 0x4265b1
mov ax, word [ebp + 0x41f4]
cmp ax, 0xffff
je 0x4265b1
mov dword [esp + 0x18], edi
mov word [esp + 0x1a], ax
lea eax, [esp + 0x18]
push 4
mov word [esp + 0x1c], cx
push eax
jmp 0x4265a6
mov ecx, ebp
call fcn.0040fe60
mov ecx, ebp
mov dword [ebp + 0x41fc], eax
call fcn.0040fec0
lea ecx, [esp + 0x220]
mov dword [ebp + 0x4200], eax
push ecx
mov ecx, ebp
lea esi, [ebp + 0x4204]
call fcn.0040fee0
mov ecx, dword [eax]
mov edx, esi
lea edi, [esp + 0x1d4]
push 0x18
mov dword [edx], ecx
mov ecx, dword [eax + 4]
mov dword [edx + 4], ecx
mov ecx, dword [eax + 8]
mov dword [edx + 8], ecx
mov eax, dword [eax + 0xc]
mov ecx, 6
mov dword [edx + 0xc], eax
mov edx, dword [ebp + 0x4200]
xor eax, eax
rep stosd dword es:[edi], eax
mov ecx, dword [ebp + 0x41fc]
mov eax, dword [esi]
mov dword [esp + 0x1d8], ecx
mov ecx, dword [esi + 4]
mov dword [esp + 0x1dc], edx
mov edx, dword [esi + 8]
mov dword [esp + 0x1e0], eax
mov eax, dword [esi + 0xc]
mov dword [esp + 0x1e4], ecx
lea ecx, [esp + 0x1d8]
mov dword [esp + 0x1e8], edx
mov edx, dword [esp + 0x24]
mov dword [esp + 0x1ec], eax
push ecx
jmp 0x4265a6
mov eax, dword [ebp + 0x4504]
or esi, 0xffffffff
mov dword [esp + 0x18], esi
mov dword [esp + 0x1c], esi
lea ecx, [eax + 0x32e8]
cmp ecx, edi
je 0x4265b1
mov eax, dword [eax + 0x3664]
push eax
lea eax, [esp + 0x170]
push eax
push esi
call fcn.00484eb0
cmp eax, 1
jne 0x4265b1
lea ecx, [esp + 0x1c]
lea edx, [esp + 0x18]
push ecx
push edx
mov ecx, ebp
call fcn.00428800
cmp eax, 1
jne 0x4265b1
cmp word [esp + 0x18], si
je 0x4265b1
mov ecx, dword [esp + 0x1c]
cmp cx, si
je 0x4265b1
mov eax, dword [esp + 0x16c]
test al, al
je 0x4265b1
lea edx, [ebp + 0x41e4]
mov esi, dword [esp + 0x174]
mov edi, edx
mov edx, dword [esp + 0x170]
push 0x14
mov dword [edi], eax
mov dword [edi + 4], edx
mov dword [edi + 8], esi
mov esi, dword [esp + 0x17c]
mov dword [edi + 0xc], esi
mov di, word [esp + 0x1c]
mov word [ebp + 0x41f6], di
xor edi, edi
mov dword [esp + 0xd0], edi
mov word [ebp + 0x41f4], cx
mov dword [esp + 0xd4], edi
mov dword [esp + 0xd2], eax
mov eax, dword [esp + 0x178]
mov dword [esp + 0xd8], edi
mov dword [esp + 0xdc], edi
mov dword [esp + 0xd6], edx
mov edx, dword [esp + 0x24]
mov dword [esp + 0xe0], edi
mov di, word [esp + 0x1c]
mov word [esp + 0xe2], cx
lea ecx, [esp + 0xd0]
mov word [esp + 0xd0], di
mov dword [esp + 0xda], eax
mov dword [esp + 0xde], esi
push ecx
jmp 0x4265a6
mov eax, dword [ebp + 0x4504]
or esi, 0xffffffff
mov dword [esp + 0x18], esi
mov dword [esp + 0x1c], esi
lea ecx, [eax + 0x32e8]
cmp ecx, edi
je 0x42659a
mov eax, dword [eax + 0x3664]
push eax
lea eax, [esp + 0x190]
push eax
push esi
call fcn.00484eb0
cmp eax, 1
jne 0x42659a
lea ecx, [esp + 0x1c]
lea edx, [esp + 0x18]
push ecx
push edx
mov ecx, ebp
call fcn.004281c0
cmp eax, 1
jne 0x42659a
cmp word [esp + 0x18], si
je 0x4265b1
mov ecx, dword [esp + 0x1c]
cmp cx, si
je 0x4265b1
mov eax, dword [esp + 0x18c]
test al, al
je 0x4265b1
lea edx, [ebp + 0x41e4]
mov esi, dword [esp + 0x194]
mov edi, edx
mov edx, dword [esp + 0x190]
push 0x14
mov dword [edi], eax
mov dword [edi + 4], edx
mov dword [edi + 8], esi
mov esi, dword [esp + 0x19c]
mov dword [edi + 0xc], esi
mov di, word [esp + 0x1c]
mov word [ebp + 0x41f6], di
xor edi, edi
mov dword [esp + 0xbc], edi
mov dword [esp + 0xbc], eax
mov eax, dword [esp + 0x198]
mov dword [esp + 0xc0], edi
mov dword [esp + 0xc4], edi
mov dword [esp + 0xc4], eax
mov dword [esp + 0xc8], edi
mov word [ebp + 0x41f4], cx
mov dword [esp + 0xcc], edi
mov dword [esp + 0xc0], edx
mov dx, word [esp + 0x1c]
mov word [esp + 0xce], cx
mov ecx, dword [esp + 0x24]
lea eax, [esp + 0xbc]
push eax
mov dword [esp + 0xcc], esi
mov word [esp + 0xd0], dx
push ecx
jmp 0x4265a7
mov dword [esp + 0x30], 0x64
jmp 0x4265b1
push edi
push edi
push edx
push ebx
push 7
mov ecx, ebp
call fcn.0041b5d0
lea ecx, [esp + 0x20]
mov byte [esp + 0x3c8], 2
call fcn.00489b20
jmp 0x4280c2
mov edx, dword [esp + 0x10]
push str.SendMessagePacket
push edx
call edi
add esp, 8
test eax, eax
jne 0x426611
push 1
push eax
lea eax, [esp + 0x1c]
push 0x49b09c
lea ecx, [esp + 0x118]
push eax
push ecx
call esi
mov eax, dword [eax]
push eax
call ebx
add esp, 0x18
lea ecx, [esp + 0x10c]
mov esi, eax
call fcn.00489b20
push 0
push 0
push esi
jmp 0x4280bb
mov edx, dword [esp + 0x10]
push str.Move
push edx
call edi
add esp, 8
test eax, eax
jne 0x426709
push 1
push eax
lea eax, [esp + 0x1c]
push 0x49b09c
lea ecx, [esp + 0x13c]
push eax
push ecx
call esi
mov eax, dword [eax]
push eax
call ebx
add esp, 0x18
lea ecx, [esp + 0x130]
mov edi, eax
call fcn.00489b20
push 1
push 0
lea edx, [esp + 0x1c]
push 0x49b09c
lea eax, [esp + 0x168]
push edx
push eax
call esi
mov eax, dword [eax]
push eax
call ebx
add esp, 0x18
lea ecx, [esp + 0x15c]
mov word [esp + 0x90], ax
call fcn.00489b20
push 1
push 0
lea ecx, [esp + 0x1c]
push 0x49b09c
lea edx, [esp + 0x144]
push ecx
push edx
call esi
mov eax, dword [eax]
push eax
call ebx
add esp, 0x18
lea ecx, [esp + 0x138]
mov word [esp + 0x92], ax
call fcn.00489b20
push 1
push 0
lea eax, [esp + 0x1c]
push 0x49b09c
lea ecx, [esp + 0x164]
push eax
push ecx
call esi
mov eax, dword [eax]
push eax
call ebx
add esp, 0x18
lea ecx, [esp + 0x158]
mov byte [esp + 0x94], al
call fcn.00489b20
push 0
push 0
lea edx, [esp + 0x98]
push edi
push edx
mov ecx, ebp
call fcn.0043ed40
jmp 0x4280c2
mov eax, dword [esp + 0x10]
push str.BreakGroup
push eax
call edi
add esp, 8
test eax, eax
jne 0x42672a
push eax
push eax
mov ecx, ebp
call fcn.00440430
jmp 0x4280c2
mov ecx, dword [esp + 0x10]
push str.GetUserResponseByCode
push ecx
call edi
add esp, 8
test eax, eax
jne 0x426867
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CString::TrimLeft
mov ecx, 6
xor eax, eax
lea edi, [esp + 0x1bc]
lea ebx, [esp + 0x1c0]
rep stosd dword es:[edi], eax
xor edi, edi
mov edx, dword [esp + 0x14]
mov eax, dword [edx - 8]
test eax, eax
je 0x4267a9
push 1
push 0
lea eax, [esp + 0x1c]
push 0x49b09c
lea ecx, [esp + 0xf0]
push eax
push ecx
call esi
mov eax, dword [eax]
push eax
call dword [sym.imp.MSVCRT.dll_atol]
add esp, 0x18
lea ecx, [esp + 0xe4]
mov dword [ebx], eax
call fcn.00489b20
inc edi
add ebx, 4
cmp edi, 5
jl 0x426763
test edi, edi
jle 0x4280c2
cmp edi, 3
jne 0x4267ff
cmp dword [esp + 0x1c0], 0x119
jne 0x426835
cmp dword [esp + 0x1c4], 0x11a
jne 0x426835
cmp dword [esp + 0x1c8], 0x11b
jne 0x426835
mov eax, dword [ebp + 0x4170]
mov edx, eax
and edx, 8
test dl, dl
jne 0x4267f3
mov edi, 1
jmp 0x426835
test ah, 4
jne 0x426835
mov edi, 2
jmp 0x426835
cmp edi, 1
jne 0x426835
mov eax, dword [esp + 0x1c0]
cmp eax, 0x299
je 0x426820
cmp eax, 0x2aa
jb 0x426835
cmp eax, 0x2af
ja 0x426835
mov ecx, dword [ebp + 0x4508]
push 0x54
call fcn.00476e20
test eax, eax
jne 0x428103
mov eax, dword [esp + 0x3d0]
mov edx, dword [ebp]
mov dword [esp + 0x1bc], eax
lea eax, [esp + 0x1bc]
push 1
lea ecx, [edi*4 + 4]
push eax
push ecx
push 0x38b
mov ecx, ebp
call dword [edx + 0xc]
jmp 0x4280c2
mov edx, dword [esp + 0x10]
push str.GetUserResponseByCode2
push edx
call edi
add esp, 8
test eax, eax
jne 0x426a61
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CString::TrimLeft
xor eax, eax
mov edi, dword [sym.imp.MSVCRT.dll_atol]
mov dword [esp + 0x1a8], eax
xor bl, bl
mov dword [esp + 0x1ac], eax
mov dword [esp + 0x1b0], eax
mov dword [esp + 0x1b4], eax
mov dword [esp + 0x1b8], eax
mov ecx, dword [esp + 0x14]
mov eax, dword [ecx - 8]
test eax, eax
je 0x4268fc
push 1
push 0
lea edx, [esp + 0x1c]
push 0x49b09c
lea eax, [esp + 0xf4]
push edx
push eax
call esi
mov eax, dword [eax]
push eax
call edi
movsx ecx, bl
add esp, 0x18
mov dword [esp + ecx*4 + 0x1a8], eax
lea ecx, [esp + 0xe8]
call fcn.00489b20
inc bl
cmp bl, 5
jl 0x4268b4
test bl, bl
jle 0x4280c2
movsx eax, bl
mov dword [esp + 0x3c], eax
mov dword [esp + 0x18], 0
shl eax, 2
mov dword [esp + 0x2c], eax
add eax, 5
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x3d0]
cmp eax, 0x4e
jne 0x4280c2
mov edx, dword [esp + 0x1c]
lea edi, [edx + 0x16]
push edi
call sub.MFC42.DLL_operatornew
mov ecx, edi
mov edx, eax
mov esi, ecx
xor eax, eax
mov edi, edx
add esp, 4
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, esi
lea esi, [esp + 0x1a8]
and ecx, 3
mov dword [esp + 0x28], edx
rep stosb byte es:[edi], al
mov ecx, dword [esp + 0x2c]
lea edi, [edx + 5]
mov eax, ecx
mov dword [edx], 0x4e
shr ecx, 2
mov byte [edx + 4], bl
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, ebp
call fcn.0040b6f0
mov eax, dword [eax + 0x24]
test eax, eax
mov dword [esp + 0x2c], eax
je 0x426a22
mov ecx, dword [esp + 0x3c]
xor eax, eax
test ecx, ecx
jle 0x426a2a
mov ebx, dword [esp + 0x18]
lea ecx, [esp + 0x19c]
inc eax
push ecx
mov ecx, dword [esp + 0x30]
push eax
mov dword [esp + 0x20], eax
call dword [sym.imp.rmDB.dll_public:_int___thiscall_CBillBattleDB::GetBattleMatchTeamName_int__char__]
cmp eax, 1
jne 0x426a0f
lea edi, [esp + 0x19c]
or ecx, 0xffffffff
xor eax, eax
mov edx, dword [esp + 0x28]
repne scasb al, byte es:[edi]
mov eax, dword [esp + 0x1c]
lea edi, [edx + ebx]
not ecx
dec ecx
add edi, eax
mov eax, ecx
lea esi, [esp + 0x19c]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x19c]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea ebx, [ebx + ecx + 1]
jmp 0x426a10
inc ebx
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x3c]
cmp eax, ecx
jl 0x4269a8
mov dword [esp + 0x18], ebx
jmp 0x426a2a
mov ecx, dword [esp + 0x3c]
mov dword [esp + 0x18], ecx
mov eax, dword [esp + 0x28]
test eax, eax
je 0x4280c2
mov ecx, dword [esp + 0x1c]
mov edx, dword [ebp]
mov esi, eax
mov eax, dword [esp + 0x18]
push 1
add eax, ecx
push esi
push eax
push 0x391
mov ecx, ebp
call dword [edx + 0xc]
push esi
call sub.MFC42.DLL_operatordelete
add esp, 4
jmp 0x4280c2
mov edx, dword [esp + 0x10]
push 0x49b8f0
push edx
call edi
add esp, 8
test eax, eax
jne 0x426ab2
push 1
push eax
lea eax, [esp + 0x1c]
push 0x49b09c
lea ecx, [esp + 0x104]
push eax
push ecx
call esi
mov eax, dword [eax]
push eax
call ebx
add esp, 0x18
lea ecx, [esp + 0xf8]
mov esi, eax
call fcn.00489b20
test esi, esi
jle 0x4280c2
add dword [esp + 0x30], esi
jmp 0x4280c2
mov edx, dword [esp + 0x10]
push str.FreeBattleZone
push edx
call edi
add esp, 8
test eax, eax
jne 0x426b24
mov eax, dword [esp + 0x14]
mov ecx, dword [eax - 8]
test ecx, ecx
je 0x426b02
push 1
push 0
lea ecx, [esp + 0x1c]
push 0x49b09c
lea edx, [esp + 0x10c]
push ecx
push edx
call esi
mov eax, dword [eax]
push eax
call ebx
add esp, 0x18
lea ecx, [esp + 0x100]
mov dword [ebp + 0x4478], eax
call fcn.00489b20
mov eax, dword [ebp]
push 1
push 0
push 0
push 0xf5
mov ecx, ebp
mov dword [ebp + 0x4544], 1
call dword [eax + 0xc]
jmp 0x4280c2
mov ecx, dword [esp + 0x10]
push str.BattleMatch
push ecx
call edi
add esp, 8
test eax, eax
jne 0x426b96
mov edx, dword [esp + 0x14]
mov eax, dword [edx - 8]
test eax, eax
je 0x426b74
push 1
push 0
lea eax, [esp + 0x1c]
push 0x49b09c
lea ecx, [esp + 0x114]
push eax
push ecx
call esi
mov eax, dword [eax]
push eax
call ebx
add esp, 0x18
lea ecx, [esp + 0x108]
mov dword [ebp + 0x4478], eax
call fcn.00489b20
mov edx, dword [ebp]
push 1
push 0
push 0
push 0xf5
mov ecx, ebp
mov dword [ebp + 0x4544], 1
call dword [edx + 0xc]
jmp 0x4280c2
mov eax, dword [esp + 0x10]
push str.EnterFreeBattleNet1000
push eax
call edi
add esp, 8
test eax, eax
jne 0x426bed
cmp dword [ebp + 0x37f8], 0x3e8
jb 0x426e1d
push 0
push 0
lea ecx, [esp + 0x68]
push 0x84
push ecx
mov ecx, ebp
mov byte [ebp + 0x4549], 4
mov word [esp + 0x70], 0x37
mov word [esp + 0x72], 0x13
mov byte [esp + 0x74], 1
call fcn.0043ed40
jmp 0x4280c2
mov edx, dword [esp + 0x10]
push str.EnterFreeBattleNetArmy
push edx
call edi
add esp, 8
test eax, eax
jne 0x426cb6
mov eax, dword [ebp + 0x4504]
cmp dword [eax + 0x3664], 3
je 0x4280c2
mov ecx, ebp
call fcn.0040b700
mov eax, dword [eax + 0x18]
lea esi, [ebp + 0x37d8]
push 0
push esi
mov ecx, eax
call dword [sym.imp.rmDB.dll_public:_int___thiscall_CArmy::IsArmyCommander_char___int_]
cmp eax, 1
je 0x426c55
mov ecx, ebp
call fcn.0040b700
mov eax, dword [eax + 0x18]
push 0
push esi
mov ecx, eax
call dword [sym.imp.rmDB.dll_public:_int___thiscall_CArmy::IsArmySubCommander_char___int_]
cmp eax, 1
jne 0x426e1d
mov ecx, ebp
call fcn.0040b700
mov ecx, dword [ebp + 0x42c8]
mov eax, dword [eax + 0x18]
push ecx
mov ecx, eax
call dword [sym.imp.rmDB.dll_public:_int___thiscall_CArmy::GetArmyAgitCount_int_]
test eax, eax
jle 0x426e1d
push 0
push 0
lea edx, [esp + 0xb0]
push 0x84
push edx
mov ecx, ebp
mov byte [ebp + 0x4549], 3
mov word [esp + 0xb8], 0x37
mov word [esp + 0xba], 0x13
mov byte [esp + 0xbc], 1
call fcn.0043ed40
jmp 0x4280c2
mov eax, dword [esp + 0x10]
push str.EnterFreeBattleNetTicket
push eax
call edi
add esp, 8
test eax, eax
jne 0x426dc1
mov ecx, ebp
call fcn.0040b700
mov eax, dword [eax + 0x40]
mov edi, dword [sym.imp.rmDB.dll_public:_unsigned_long_int___thiscall_CSpecialItem::GetUserWindowItemCount_char_const___int__int__int_]
push 0x49
mov ebx, 1
lea esi, [ebp + 0x37d8]
push 6
push ebx
push esi
mov ecx, eax
call edi
test eax, eax
ja 0x426d13
mov ecx, ebp
call fcn.0040b700
mov eax, dword [eax + 0x40]
push 0x49
push 6
push 3
push esi
mov ecx, eax
call edi
test eax, eax
jbe 0x426e1d
cmp dword [ebp + 0x449c], ebx
je 0x426e2d
mov eax, dword [ebp + 0x4504]
cmp dword [eax + 0x3694], ebx
jne 0x426d6d
push 0
push 0
lea ecx, [esp + 0xa0]
push 0x84
push ecx
mov ecx, ebp
mov byte [ebp + 0x4549], 1
mov word [esp + 0xa8], 0x37
mov word [esp + 0xaa], 0x13
mov byte [esp + 0xac], 1
call fcn.0043ed40
jmp 0x4280c2
cmp dword [eax + 0x3698], ebx
jne 0x4280c2
mov dx, word [ebp + 0x4478]
push 0
add dx, 0xb3
push 0
lea eax, [esp + 0x80]
push edx
push eax
mov ecx, ebp
mov byte [ebp + 0x4549], 1
mov word [esp + 0x88], 0x2d
mov word [esp + 0x8a], 0x4b
mov byte [esp + 0x8c], 1
call fcn.0043ed40
jmp 0x4280c2
mov ecx, dword [esp + 0x10]
push str.EnterFreeBattleNetMoney
push ecx
call edi
add esp, 8
test eax, eax
jne 0x426edc
mov edx, dword [ebp + 0x4504]
mov esi, 1
mov eax, dword [edx + 0x3664]
cmp eax, esi
jne 0x426df4
mov eax, 0x1e8480
jmp 0x426e05
sub eax, 3
neg eax
sbb eax, eax
and eax, 0x76e8c900
add eax, 0x9502f900
mov edi, dword [ebp + 0x3f94]
xor ecx, ecx
cmp edi, ecx
ja 0x426e39
jb 0x426e1d
mov ecx, dword [ebp + 0x3f90]
cmp ecx, eax
jae 0x426e39
push 0
push 0
push 0x138
mov ecx, ebp
call fcn.0043fc10
mov byte [ebp + 0x4549], 0
jmp 0x4280c2
cmp dword [ebp + 0x449c], esi
je 0x426e2d
cmp dword [edx + 0x3694], esi
jne 0x426e89
push 0
push 0
lea edx, [esp + 0xa8]
push 0x84
push edx
mov ecx, ebp
mov byte [ebp + 0x4549], 2
mov word [esp + 0xb0], 0x37
mov word [esp + 0xb2], 0x13
mov byte [esp + 0xb4], 1
call fcn.0043ed40
jmp 0x4280c2
cmp dword [edx + 0x3698], esi
jne 0x4280c2
mov ax, word [ebp + 0x4478]
push 0
add ax, 0xb3
push 0
lea ecx, [esp + 0x90]
push eax
push ecx
mov ecx, ebp
mov byte [ebp + 0x4549], 2
mov word [esp + 0x98], 0x2d
mov word [esp + 0x9a], 0x4b
mov byte [esp + 0x9c], 1
call fcn.0043ed40
jmp 0x4280c2
mov edx, dword [esp + 0x10]
push str.ActivateUser
push edx
call edi
add esp, 8
test eax, eax
jne 0x426efe
mov dword [ebp + 0x4340], 1
jmp 0x4280c2
mov eax, dword [esp + 0x10]
push 0x49b854
push eax
call edi
add esp, 8
test eax, eax
jne 0x426f66
mov eax, dword [ebp + 0x416c]
test eax, eax
jbe 0x4280c2
mov ecx, ebp
call fcn.0040b700
mov eax, dword [eax + 8]
lea esi, [ebp + 0x37d8]
push esi
mov ecx, eax
call dword [sym.imp.rmDB.dll_public:_int___thiscall_CUserDB::DecreaseBonusInitCount_char_const__]
cmp eax, 1
jne 0x4280c2
mov ecx, ebp
call fcn.00428e10
mov ecx, ebp
call fcn.0040b700
mov eax, dword [eax + 8]
push esi
mov ecx, eax
call dword [sym.imp.rmDB.dll_public:_unsigned_long_int___thiscall_CUserDB::GetBonusInitCount_char_const__]
mov dword [ebp + 0x416c], eax
jmp 0x4280c2
mov ecx, dword [esp + 0x10]
push str.OpenDoctor
push ecx
call edi
add esp, 8
test eax, eax
jne 0x426f85
mov ecx, ebp
call fcn.0041b420
jmp 0x4280c2
mov edx, dword [esp + 0x10]
push str.AddQuestItem
push edx
call edi
add esp, 8
test eax, eax
jne 0x427080
mov edi, dword [ebp + 0x4504]
add edi, 0x32e8
je 0x4280c2
push 1
push eax
lea eax, [esp + 0x1c]
push 0x49b09c
lea ecx, [esp + 0x11c]
push eax
push ecx
call esi
mov eax, dword [eax]
push eax
call ebx
add esp, 0x18
lea ecx, [esp + 0x110]
mov byte [esp + 0x17c], al
call fcn.00489b20
push 1
push 0
lea edx, [esp + 0x1c]
push 0x49b09c
lea eax, [esp + 0x124]
push edx
push eax
call esi
mov eax, dword [eax]
push eax
call ebx
add esp, 0x18
lea ecx, [esp + 0x118]
mov word [esp + 0x17e], ax
call fcn.00489b20
push 1
push 0
lea ecx, [esp + 0x1c]
push 0x49b09c
lea edx, [esp + 0x158]
push ecx
push edx
call esi
mov eax, dword [eax]
push eax
call ebx
add esp, 0x18
lea ecx, [esp + 0x14c]
mov dword [esp + 0x180], eax
call fcn.00489b20
movsx eax, word [esp + 0x17e]
mov ecx, dword [esp + 0x17c]
push eax
push ecx
mov ecx, edi
call fcn.00484e80
test eax, eax
je 0x4280c2
lea edx, [esp + 0x17c]
push 0x49c738
push edx
mov ecx, ebp
call fcn.00432100
jmp 0x4280c2
mov eax, dword [esp + 0x10]
push str.RemoveQuestItem
push eax
call edi
add esp, 8
test eax, eax
jne 0x42711b
push 1
push eax
lea ecx, [esp + 0x1c]
push 0x49b09c
lea edx, [esp + 0x160]
push ecx
push edx
call esi
mov eax, dword [eax]
push eax
call ebx
add esp, 0x18
lea ecx, [esp + 0x154]
mov byte [esp + 0x1fc], al
call fcn.00489b20
push 1
push 0
lea eax, [esp + 0x1c]
push 0x49b09c
lea ecx, [esp + 0x170]
push eax
push ecx
call esi
mov eax, dword [eax]
push eax
call ebx
add esp, 0x18
lea ecx, [esp + 0x164]
mov word [esp + 0x1fe], ax
call fcn.00489b20
mov edx, dword [esp + 0x1fe]
mov eax, dword [esp + 0x1fc]
push 0xffffffffffffffff
push edx
push eax
mov ecx, ebp
call fcn.004321e0
jmp 0x4280c2
mov ecx, dword [esp + 0x10]
push str.MarkStoryQuestState
push ecx
call edi
add esp, 8
test eax, eax
jne 0x4271de
push 1
push eax
lea edx, [esp + 0x1c]
push 0x49b09c
lea eax, [esp + 0x174]
push edx
push eax
call esi
mov eax, dword [eax]
push eax
call dword [sym.imp.MSVCRT.dll_atol]
add esp, 0x18
lea ecx, [esp + 0x168]
mov edi, eax
call fcn.00489b20
mov ecx, ebp
call fcn.0040b700
mov eax, dword [eax + 8]
lea esi, [ebp + 0x37d8]
push esi
mov ecx, eax
call dword [sym.imp.rmDB.dll_public:_unsigned_long_int___thiscall_CUserDB::GetStoryQuestState_char_const__]
or eax, edi
mov ecx, ebp
mov dword [ebp + 0x4170], eax
call fcn.0040b700
mov ecx, dword [ebp + 0x4170]
mov eax, dword [eax + 8]
push ecx
push esi
mov ecx, eax
call dword [sym.imp.rmDB.dll_public:_int___thiscall_CUserDB::SetStoryQuestState_char_const___unsigned_long_int_]
mov ecx, ebp
call fcn.004254e0
cmp dword [ebp + 0x37f8], 0x32
jb 0x4280c2
mov eax, dword [ebp + 0x4170]
mov edx, eax
and edx, 0x40
test dl, dl
je 0x4280c2
and eax, 0x80
test al, al
jne 0x4280c2
mov ecx, ebp
call fcn.00438260
jmp 0x4280c2
mov eax, dword [esp + 0x10]
push str.SpyQuestEnd1
push eax
call edi
add esp, 8
test eax, eax
jne 0x4272b5
test byte [ebp + 0x4170], 2
jne 0x427272
mov eax, dword [ebp + 0x37f8]
cmp eax, 0x3e8
jb 0x427210
mov eax, 0x3e8
mov ecx, dword [ebp + 0x4504]
push 0xa
mov edx, dword [ecx + eax*4 + 0x21cc]
mov eax, 0x51eb851f
push edx
mul dword [ecx + 0x235c]
shr edx, 4
push edx
mov ecx, ebp
call fcn.00438e70
test eax, eax
mov dword [esp + 0x140], eax
jbe 0x427254
lea eax, [esp + 0x140]
push 4
push eax
push 0x7d
mov ecx, ebp
call fcn.0043fc10
mov dword [esp + 0xec], 0x64
push 4
lea ecx, [esp + 0xf0]
push ecx
push 0x7b
mov ecx, ebp
call fcn.0043fc10
push 0
push 0
push 0x77
mov ecx, ebp
call fcn.0043fc10
cmp dword [ebp + 0x449c], 2
jne 0x4280c2
mov edx, dword [ebp + 0x4504]
mov eax, dword [edx + 0x3664]
test eax, eax
jne 0x4280c2
push 0x4c4b40
lea ecx, [ebp + 0x21b8]
call fcn.00409ea0
jmp 0x4280c2
mov eax, dword [esp + 0x10]
push str.SpyQuestEnd2
push eax
call edi
add esp, 8
test eax, eax
jne 0x427340
test byte [ebp + 0x4170], 2
jne 0x427272
mov eax, dword [ebp + 0x37f8]
cmp eax, 0x3e8
jb 0x4272e3
mov eax, 0x3e8
mov ecx, dword [ebp + 0x4504]
push 0xa
mov edx, dword [ecx + eax*4 + 0x21cc]
mov eax, 0xcccccccd
push edx
mul dword [ecx + 0x235c]
shr edx, 3
push edx
mov ecx, ebp
call fcn.00438e70
test eax, eax
mov dword [esp + 0x160], eax
jbe 0x427327
lea eax, [esp + 0x160]
push 4
push eax
push 0x7d
mov ecx, ebp
call fcn.0043fc10
mov dword [esp + 0xf4], 0x64
push 4
lea ecx, [esp + 0xf8]
jmp 0x427268
mov eax, dword [esp + 0x10]
push str.SendQuestInfo
push eax
call edi
add esp, 8
test eax, eax
jne 0x42735f
mov ecx, ebp
call fcn.004254e0
jmp 0x4280c2
mov ecx, dword [esp + 0x10]
push str.SendMessagePacket
push ecx
call edi
add esp, 8
test eax, eax
jne 0x4273a9
push 1
push eax
lea edx, [esp + 0x1c]
push 0x49b09c
lea eax, [esp + 0x154]
push edx
push eax
call esi
mov eax, dword [eax]
push eax
call ebx
add esp, 0x18
lea ecx, [esp + 0x148]
mov esi, eax
call fcn.00489b20
push 0
push 0
push esi
jmp 0x4280bb
mov ecx, dword [esp + 0x10]
push str.SayKasamRecollectEnd
push ecx
call edi
add esp, 8
test eax, eax
jne 0x427417
mov ebx, dword [ebp + 0x4170]
mov ecx, ebp
or bh, 8
mov dword [ebp + 0x4170], ebx
call fcn.0040b700
mov edx, dword [ebp + 0x4170]
mov eax, dword [eax + 8]
lea esi, [ebp + 0x37d8]
push edx
push esi
mov ecx, eax
call dword [sym.imp.rmDB.dll_public:_int___thiscall_CUserDB::SetStoryQuestState_char_const___unsigned_long_int_]
mov ecx, ebp
call fcn.0040b700
mov eax, dword [eax + 8]
push esi
mov ecx, eax
call dword [sym.imp.rmDB.dll_public:_unsigned_long_int___thiscall_CUserDB::GetStoryQuestState_char_const__]
mov ecx, ebp
mov dword [ebp + 0x4170], eax
call fcn.004254e0
mov ecx, ebp
call fcn.004254a0
jmp 0x4280c2
mov eax, dword [esp + 0x10]
push str.KasamRecollectQuestEnd
push eax
call edi
add esp, 8
test eax, eax
jne 0x427461
mov esi, dword [ebp + 0x4170]
or esi, 0x1000
mov ecx, ebp
mov dword [ebp + 0x4170], esi
call fcn.0040b700
mov ecx, dword [ebp + 0x4170]
mov eax, dword [eax + 8]
lea edx, [ebp + 0x37d8]
push ecx
push edx
mov ecx, eax
call dword [sym.imp.rmDB.dll_public:_int___thiscall_CUserDB::SetStoryQuestState_char_const___unsigned_long_int_]
jmp 0x4280c2
mov eax, dword [esp + 0x10]
push str.IncreaseRecollectBonus
push eax
call edi
add esp, 8
test eax, eax
jne 0x42747f
inc dword [ebp + 0x4540]
jmp 0x4280c2
mov ecx, dword [esp + 0x10]
push str.RecollectQuestEnd
push ecx
call edi
add esp, 8
test eax, eax
jne 0x427605
mov eax, dword [ebp + 0x4170]
test ah, 0x20
jne 0x4275f2
or ah, 0x60
mov ecx, ebp
mov dword [ebp + 0x4170], eax
call fcn.0040b700
mov edx, dword [ebp + 0x4170]
mov eax, dword [eax + 8]
lea esi, [ebp + 0x37d8]
push edx
push esi
mov ecx, eax
call dword [sym.imp.rmDB.dll_public:_int___thiscall_CUserDB::SetStoryQuestState_char_const___unsigned_long_int_]
mov eax, dword [ebp + 0x4540]
inc eax
cmp eax, 4
mov edi, eax
jb 0x4274e1
mov edi, 4
xor ebx, ebx
cmp edi, ebx
mov dword [ebp + 0x4540], ebx
jbe 0x42757d
mov eax, dword [ebp + 0x37f8]
cmp eax, 0x3e8
jb 0x427503
mov eax, 0x3e8
mov ecx, dword [ebp + 0x4504]
push 0xa
mov eax, dword [ecx + eax*4 + 0x21cc]
push eax
mov eax, 0x51eb851f
mul dword [ecx + 0x299c]
shr edx, 4
imul edx, edi
push edx
mov ecx, ebp
call fcn.00438e70
cmp eax, ebx
mov dword [esp + 0xfc], eax
jbe 0x42754a
lea ecx, [esp + 0xfc]
push 4
push ecx
push 0x7d
mov ecx, ebp
call fcn.0043fc10
cmp dword [ebp + 0x3f6c], ebx
je 0x42757d
lea edx, [edi + edi*4]
mov ecx, ebp
shl edx, 1
push edx
call fcn.004397c0
cmp eax, ebx
mov dword [esp + 0x120], eax
jbe 0x42757d
lea eax, [esp + 0x120]
push 4
push eax
push 0x7c
mov ecx, ebp
call fcn.0043fc10
lea ecx, [esp + 0x104]
push 4
push ecx
push 0x7b
mov ecx, ebp
mov dword [esp + 0x110], 0x1f4
call fcn.0043fc10
mov ecx, ebp
mov dword [ebp + 0x4560], ebx
mov byte [ebp + 0x4564], 0
call fcn.0040b700
mov eax, dword [eax + 8]
push esi
mov ecx, eax
call dword [sym.imp.rmDB.dll_public:_int___thiscall_CUserDB::SetUser_struct_USERDB__]
mov ecx, ebp
call fcn.0040b700
mov eax, dword [eax + 0x38]
push esi
mov ecx, eax
call dword [sym.imp.rmDB.dll_public:_int___thiscall_CQuest::SendKasamSpaceshipMail_char_const__]
mov ecx, ebp
call fcn.0040b700
mov eax, dword [eax + 8]
push esi
mov ecx, eax
call dword [sym.imp.rmDB.dll_public:_unsigned_long_int___thiscall_CUserDB::GetStoryQuestState_char_const__]
push ebx
push ebx
push 0x74
mov ecx, ebp
mov dword [ebp + 0x4170], eax
call fcn.0043fc10
mov ecx, ebp
call fcn.004254e0
mov ecx, ebp
call fcn.004254a0
jmp 0x4280c2
mov edx, dword [esp + 0x10]
push str.KasamSpaceShipQuestEnd
push edx
call edi
add esp, 8
test eax, eax
jne 0x427629
mov esi, dword [ebp + 0x4170]
or esi, 0x8000
jmp 0x427436
mov eax, dword [esp + 0x10]
push str.SaharaMiniMapQuestEnd
push eax
call edi
add esp, 8
test eax, eax
jne 0x42775e
mov eax, dword [ebp + 0x4170]
test al, 8
jne 0x42771b
or al, 8
mov ecx, ebp
mov dword [ebp + 0x4170], eax
call fcn.0040b700
mov ecx, dword [ebp + 0x4170]
mov eax, dword [eax + 8]
lea edx, [ebp + 0x37d8]
push ecx
push edx
mov ecx, eax
call dword [sym.imp.rmDB.dll_public:_int___thiscall_CUserDB::SetStoryQuestState_char_const___unsigned_long_int_]
mov eax, dword [ebp + 0x37f8]
cmp eax, 0x3e8
jb 0x427688
mov eax, 0x3e8
mov ecx, dword [ebp + 0x4504]
push 0xa
mov eax, dword [ecx + eax*4 + 0x21cc]
push eax
mov eax, 0x51eb851f
mul dword [ecx + 0x24ec]
shr edx, 4
push edx
mov ecx, ebp
call fcn.00438e70
test eax, eax
mov dword [esp + 0x124], eax
jbe 0x4276cc
lea ecx, [esp + 0x124]
push 4
push ecx
push 0x7d
mov ecx, ebp
call fcn.0043fc10
mov eax, dword [ebp + 0x3f6c]
test eax, eax
je 0x4276fd
push 0x1e
mov ecx, ebp
call fcn.004397c0
test eax, eax
mov dword [esp + 0xe0], eax
jbe 0x4276fd
lea edx, [esp + 0xe0]
push 4
push edx
push 0x7c
mov ecx, ebp
call fcn.0043fc10
lea eax, [esp + 0x12c]
push 4
push eax
push 0x7b
mov ecx, ebp
mov dword [esp + 0x138], 0xc8
call fcn.0043fc10
push 0
push 0
push 0x77
mov ecx, ebp
call fcn.0043fc10
cmp dword [ebp + 0x449c], 2
jne 0x4280c2
mov ecx, dword [ebp + 0x4504]
mov eax, dword [ecx + 0x3664]
test eax, eax
jne 0x4280c2
push 0x989680
lea ecx, [ebp + 0x21b8]
call fcn.00409ea0
jmp 0x4280c2
mov edx, dword [esp + 0x10]
push str.KasamQuestEnd
push edx
call edi
add esp, 8
test eax, eax
jne 0x4279f2
mov eax, dword [ebp + 0x4170]
test al, 0x40
jne 0x427850
or al, 0x40
mov ecx, ebp
mov dword [ebp + 0x4170], eax
call fcn.0040b700
mov ecx, dword [ebp + 0x4170]
mov eax, dword [eax + 8]
lea edx, [ebp + 0x37d8]
push ecx
push edx
mov ecx, eax
call dword [sym.imp.rmDB.dll_public:_int___thiscall_CUserDB::SetStoryQuestState_char_const___unsigned_long_int_]
mov eax, dword [ebp + 0x37f8]
cmp eax, 0x3e8
jb 0x4277bd
mov eax, 0x3e8
mov ecx, dword [ebp + 0x4504]
push 0xa
mov eax, dword [ecx + eax*4 + 0x21cc]
push eax
mov eax, 0x51eb851f
mul dword [ecx + 0x267c]
shr edx, 4
push edx
mov ecx, ebp
call fcn.00438e70
test eax, eax
mov dword [esp + 0x114], eax
jbe 0x427801
lea ecx, [esp + 0x114]
push 4
push ecx
push 0x7d
mov ecx, ebp
call fcn.0043fc10
mov eax, dword [ebp + 0x3f6c]
test eax, eax
je 0x427832
push 0x32
mov ecx, ebp
call fcn.004397c0
test eax, eax
mov dword [esp + 0x134], eax
jbe 0x427832
lea edx, [esp + 0x134]
push 4
push edx
push 0x7c
mov ecx, ebp
call fcn.0043fc10
lea eax, [esp + 0x11c]
push 4
push eax
push 0x7b
mov ecx, ebp
mov dword [esp + 0x128], 0x12c
call fcn.0043fc10
push 0xffffffffffffffff
push 0x66
push 5
mov ecx, ebp
call fcn.004321e0
push 0xffffffffffffffff
push 0x67
push 5
mov ecx, ebp
call fcn.004321e0
mov esi, 1
lea ecx, [esp + 0x40]
push esi
push 0
push ecx
mov ecx, ebp
mov byte [esp + 0x4c], 5
mov word [esp + 0x4e], 0x66
mov dword [esp + 0x50], esi
call fcn.00431c60
test eax, eax
jne 0x4278ce
mov dx, word [ebp + 0x3800]
mov ax, word [ebp + 0x3802]
mov cl, byte [ebp + 0x3804]
mov word [esp + 0xb0], dx
mov word [esp + 0xb2], ax
lea edx, [esp + 0xb0]
push 0
lea eax, [esp + 0x44]
push edx
mov byte [esp + 0xbc], cl
push eax
jmp 0x427904
mov eax, dword [esp + 0x44]
test eax, eax
ja 0x42790f
mov cx, word [ebp + 0x3800]
mov dx, word [ebp + 0x3802]
mov al, byte [ebp + 0x3804]
mov word [esp + 0x68], cx
mov word [esp + 0x6a], dx
lea ecx, [esp + 0x68]
push 0
lea edx, [esp + 0x44]
push ecx
mov byte [esp + 0x74], al
push edx
mov ecx, dword [ebp + 0x4504]
call fcn.00462380
push esi
lea eax, [esp + 0x44]
push 0
push eax
mov ecx, ebp
mov byte [esp + 0x4c], 5
mov word [esp + 0x4e], 0x67
mov dword [esp + 0x50], esi
call fcn.00431c60
test eax, eax
jne 0x427962
mov cx, word [ebp + 0x3800]
mov dx, word [ebp + 0x3802]
mov al, byte [ebp + 0x3804]
mov word [esp + 0x70], cx
mov word [esp + 0x72], dx
lea ecx, [esp + 0x70]
push 0
lea edx, [esp + 0x44]
push ecx
mov byte [esp + 0x7c], al
push edx
jmp 0x4279a4
mov eax, dword [esp + 0x44]
test eax, eax
ja 0x4279af
mov ax, word [ebp + 0x3800]
mov cx, word [ebp + 0x3802]
mov dl, byte [ebp + 0x3804]
mov word [esp + 0x80], ax
mov word [esp + 0x82], cx
lea eax, [esp + 0x80]
push 0
lea ecx, [esp + 0x44]
push eax
mov byte [esp + 0x8c], dl
push ecx
mov ecx, dword [ebp + 0x4504]
call fcn.00462380
push 0
push 0
push 0x77
mov ecx, ebp
call fcn.0043fc10
cmp dword [ebp + 0x449c], 2
jne 0x4280c2
mov edx, dword [ebp + 0x4504]
mov eax, dword [edx + 0x3664]
test eax, eax
jne 0x4280c2
push 0xe4e1c0
lea ecx, [ebp + 0x21b8]
call fcn.00409ea0
jmp 0x4280c2
mov eax, dword [esp + 0x10]
push str.StopSubQuestAndResume
push eax
call edi
add esp, 8
test eax, eax
jne 0x427a97
lea edx, [ebp + 0x41cc]
or ecx, 0xffffffff
mov edi, edx
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x4280c2
mov ecx, dword [ebp + 0x4520]
lea eax, [ebp + 0x4520]
test ecx, ecx
je 0x4280c2
mov ecx, 5
mov esi, eax
lea edi, [esp + 0x20c]
rep movsd dword es:[edi], dword [esi]
xor ecx, ecx
mov dword [edx], ecx
mov dword [edx + 4], ecx
mov dword [edx + 8], ecx
mov dword [edx + 0xc], ecx
mov byte [edx + 0x10], cl
mov ecx, eax
xor edx, edx
mov word [ebp + 0x41de], 0xffff
mov dword [ecx], edx
mov dword [ecx + 4], edx
mov dword [ecx + 8], edx
mov dword [ecx + 0xc], edx
push ecx
mov dword [ecx + 0x10], edx
mov ecx, esp
mov dword [esp + 0x30], esp
push 0x49c738
mov dword [eax], edx
call sub.MFC42.DLL_CString::CString_2
lea edx, [esp + 0x210]
push 0xffffffffffffffff
push edx
mov ecx, ebp
call fcn.0041ee70
jmp 0x4280c2
mov eax, dword [esp + 0x10]
push str.BeginRandEvent
push eax
call edi
add esp, 8
test eax, eax
jne 0x427b4c
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CString::TrimLeft
mov ecx, 0x64
xor eax, eax
lea edi, [esp + 0x230]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x230]
xor edi, edi
mov dword [esp + 0x1c], ecx
mov edx, dword [esp + 0x14]
mov eax, dword [edx - 8]
test eax, eax
je 0x427b22
push 1
push 0
lea eax, [esp + 0x1c]
push 0x49b09c
lea ecx, [esp + 0x148]
push eax
push ecx
call esi
mov eax, dword [eax]
push eax
call ebx
mov edx, dword [esp + 0x34]
add esp, 0x18
lea ecx, [esp + 0x13c]
mov dword [edx], eax
call fcn.00489b20
mov ecx, dword [esp + 0x1c]
inc edi
add ecx, 4
cmp edi, 0x64
mov dword [esp + 0x1c], ecx
jl 0x427ad4
test edi, edi
jle 0x4280c2
call dword [sym.imp.MSVCRT.dll_rand]
cdq
idiv edi
mov ecx, ebp
mov eax, dword [esp + edx*4 + 0x230]
push eax
push str.EventTriggered
call fcn.00410450
jmp 0x4280c2
mov ecx, dword [esp + 0x10]
push str.BeginSubQuest1
push ecx
call edi
add esp, 8
test eax, eax
jne 0x427bea
mov eax, dword [ebp + 0x41c4]
test eax, eax
jne 0x4280c2
lea edi, [ebp + 0x41cc]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x4280c2
cmp word [ebp + 0x41de], 0xffff
je 0x4280c2
cmp word [ebp + 0x41e0], ax
jl 0x4280c2
cmp word [ebp + 0x41f4], ax
jl 0x4280c2
cmp word [ebp + 0x41f6], ax
jl 0x4280c2
mov eax, 1
mov ecx, ebp
mov dword [ebp + 0x41c4], eax
mov dword [ebp + 0x41f8], 0x1b7740
mov dword [ebp + 0x43c4], eax
call fcn.004254e0
mov ecx, ebp
call fcn.004254a0
jmp 0x4280c2
mov edx, dword [esp + 0x10]
push str.BeginSubQuest2
push edx
call edi
add esp, 8
test eax, eax
jne 0x427c99
mov eax, dword [ebp + 0x41c4]
test eax, eax
jne 0x4280c2
lea edi, [ebp + 0x41cc]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x4280c2
cmp word [ebp + 0x41de], 0xffff
je 0x4280c2
cmp word [ebp + 0x41e0], ax
jl 0x4280c2
cmp word [ebp + 0x41f4], ax
jl 0x4280c2
cmp word [ebp + 0x41f6], ax
jl 0x4280c2
mov al, byte [ebp + 0x41e4]
test al, al
je 0x4280c2
mov ecx, ebp
mov dword [ebp + 0x41c4], 2
mov dword [ebp + 0x41f8], 0x1b7740
mov dword [ebp + 0x43c4], 1
call fcn.004254e0
mov ecx, ebp
call fcn.004254a0
jmp 0x4280c2
mov eax, dword [esp + 0x10]
push str.BeginSubQuest3
push eax
call edi
add esp, 8
test eax, eax
jne 0x427d95
mov eax, dword [ebp + 0x41c4]
test eax, eax
jne 0x4280c2
lea edi, [ebp + 0x41cc]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x4280c2
cmp word [ebp + 0x41de], 0xffff
je 0x4280c2
cmp word [ebp + 0x41e0], ax
jl 0x4280c2
cmp word [ebp + 0x41f4], ax
jl 0x4280c2
cmp word [ebp + 0x41f6], ax
jl 0x4280c2
mov al, byte [ebp + 0x41e4]
test al, al
je 0x4280c2
mov ecx, dword [ebp + 0x41e4]
mov edx, dword [ebp + 0x41e8]
mov eax, dword [ebp + 0x41ec]
mov dword [esp + 0x1ec], ecx
mov ecx, dword [ebp + 0x41f0]
mov dword [esp + 0x1f0], edx
lea edx, [esp + 0x1ec]
mov dword [esp + 0x1f8], ecx
push 0x49c738
push edx
mov ecx, ebp
mov dword [esp + 0x1fc], eax
call fcn.00432100
cmp eax, 1
jne 0x4280c2
mov ecx, ebp
mov dword [ebp + 0x41c4], 3
mov dword [ebp + 0x41f8], 0x1b7740
mov dword [ebp + 0x43c4], eax
call fcn.004254e0
mov ecx, ebp
call fcn.004254a0
jmp 0x4280c2
mov eax, dword [esp + 0x10]
push str.KasamQuest4End
push eax
call edi
add esp, 8
test eax, eax
jne 0x427eda
mov eax, dword [ebp + 0x4170]
test ah, 4
jne 0x427e89
or ah, 4
mov ecx, ebp
mov dword [ebp + 0x4170], eax
call fcn.0040b700
mov ecx, dword [ebp + 0x4170]
mov eax, dword [eax + 8]
lea edx, [ebp + 0x37d8]
push ecx
push edx
mov ecx, eax
call dword [sym.imp.rmDB.dll_public:_int___thiscall_CUserDB::SetStoryQuestState_char_const___unsigned_long_int_]
mov eax, dword [ebp + 0x37f8]
cmp eax, 0x3e8
jb 0x427df6
mov eax, 0x3e8
mov ecx, dword [ebp + 0x4504]
push 0xa
mov eax, dword [ecx + eax*4 + 0x21cc]
push eax
mov eax, 0x51eb851f
mul dword [ecx + 0x280c]
shr edx, 4
push edx
mov ecx, ebp
call fcn.00438e70
test eax, eax
mov dword [esp + 0x144], eax
jbe 0x427e3a
lea ecx, [esp + 0x144]
push 4
push ecx
push 0x7d
mov ecx, ebp
call fcn.0043fc10
mov eax, dword [ebp + 0x3f6c]
test eax, eax
je 0x427e6b
push 0x32
mov ecx, ebp
call fcn.004397c0
test eax, eax
mov dword [esp + 0x128], eax
jbe 0x427e6b
lea edx, [esp + 0x128]
push 4
push edx
push 0x7c
mov ecx, ebp
call fcn.0043fc10
lea eax, [esp + 0x150]
push 4
push eax
push 0x7b
mov ecx, ebp
mov dword [esp + 0x15c], 0x190
call fcn.0043fc10
push 0
push 0
push 0x77
mov ecx, ebp
call fcn.0043fc10
mov ecx, ebp
call fcn.004254e0
mov ecx, ebp
call fcn.004254a0
cmp dword [ebp + 0x449c], 2
jne 0x4280c2
mov ecx, dword [ebp + 0x4504]
mov eax, dword [ecx + 0x3664]
test eax, eax
jne 0x4280c2
push 0x1312d00
lea ecx, [ebp + 0x21b8]
call fcn.00409ea0
jmp 0x4280c2
mov edx, dword [esp + 0x10]
push str.TryMakeMysteryPill
push edx
call edi
add esp, 8
test eax, eax
jne 0x42800a
mov byte [esp + 0x59], al
mov byte [esp + 0x5a], al
mov byte [esp + 0x5b], al
mov byte [esp + 0x5c], al
mov byte [esp + 0x5d], al
mov edi, 1
mov dword [esp + 0x34], eax
mov byte [esp + 0x38], al
lea eax, [esp + 0x34]
push edi
lea ecx, [esp + 0x54]
push eax
push ecx
mov ecx, ebp
mov byte [esp + 0x5c], 6
mov word [esp + 0x5e], 0x42
mov byte [esp + 0x64], 4
mov dword [esp + 0x60], edi
call fcn.004341a0
mov edx, dword [esp + 0x38]
mov dword [esp + 0x54], eax
mov eax, dword [esp + 0x34]
push edx
push eax
mov ecx, ebp
call fcn.00431880
mov esi, eax
test esi, esi
je 0x4280c2
mov eax, dword [esp + 0x54]
mov ebx, dword [esi + 4]
cmp eax, edi
jne 0x427f9b
mov eax, dword [esp + 0x34]
cmp eax, edi
je 0x427f70
cmp eax, 3
jne 0x427f9b
mov ecx, ebp
call fcn.0040b700
mov edi, dword [eax + 0x38]
call dword [sym.imp.MSVCRT.dll_rand]
movsx ecx, byte [esp + 0x38]
mov edx, dword [esp + 0x34]
push eax
push ecx
lea eax, [ebp + 0x37d8]
push edx
push eax
mov ecx, edi
call dword [sym.imp.rmDB.dll_public:_void___thiscall_CQuest::TryMakeMysteryPill_char_const___int__int__int_]
mov ecx, ebp
call fcn.0040b700
mov eax, dword [eax + 8]
lea ecx, [ebp + 0x3f8a]
lea edx, [ebp + 0x3f88]
push ecx
push edx
lea ecx, [ebp + 0x3f86]
lea edx, [ebp + 0x37d8]
push ecx
push edx
mov ecx, eax
call dword [sym.imp.rmDB.dll_public:_int___thiscall_CUserDB::GetBonus2_char_const___unsigned_short_int___unsigned_short_int___unsigned_short_int__]
mov ecx, ebp
call fcn.00439dd0
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x34]
push 0
push eax
push ecx
mov ecx, ebp
call fcn.00431fe0
cmp dword [esi + 4], ebx
jbe 0x427ff9
push str.MakeMysteryPillSuccess
mov ecx, ebp
call fcn.00410410
jmp 0x4280c2
push str.MakeMysteryPillFail
mov ecx, ebp
call fcn.00410410
jmp 0x4280c2
mov edx, dword [esp + 0x10]
push str.OpenShop
push edx
call edi
add esp, 8
test eax, eax
jne 0x428031
mov ax, word [ebp + 0x4550]
mov ecx, ebp
push eax
call fcn.0042ae90
jmp 0x4280c2
mov ecx, dword [esp + 0x10]
push str.BeShopOwner
push ecx
call edi
add esp, 8
test eax, eax
jne 0x4280c2
mov ecx, ebp
call fcn.0040b700
mov esi, dword [eax + 0x18]
test esi, esi
je 0x4280c2
mov eax, dword [ebp + 0x4550]
test eax, eax
jle 0x4280c2
cmp eax, 0x18
jg 0x4280c2
push eax
mov ecx, esi
call dword [sym.imp.rmDB.dll_public:_int___thiscall_CArmy::IsEmptyArmyShop_int_]
cmp eax, 1
jne 0x4280c2
mov edx, dword [ebp + 0x42c8]
lea eax, [ebp + 0x37d8]
push edx
push eax
mov ecx, esi
call dword [sym.imp.rmDB.dll_public:_int___thiscall_CArmy::IsArmyCommander_char___int_]
cmp eax, 1
jne 0x4280c2
mov ecx, dword [ebp + 0x4550]
mov edx, dword [ebp + 0x42c8]
push ecx
push edx
mov ecx, esi
call dword [sym.imp.rmDB.dll_public:_int___thiscall_CArmy::BeginCotrolEmptyArmyShop_int__int_]
cmp eax, 1
jne 0x4280c2
mov al, byte [ebp + 0x4550]
lea ecx, [esp + 0x27]
push 1
push ecx
mov byte [esp + 0x2f], al
push 0x11d
mov ecx, ebp
call fcn.0043fc10
lea ecx, [esp + 0x10]
mov byte [esp + 0x3c8], 1
call fcn.00489b20
lea ecx, [esp + 0x14]
mov byte [esp + 0x3c8], 0
call fcn.00489b20
mov edx, dword [esp + 0x3d4]
mov eax, dword [edx - 8]
test eax, eax
je 0x428153
mov ebx, dword [sym.imp.MSVCRT.dll_atoi]
mov esi, dword [sym.imp.Staff2.dll_class_CString___cdecl_STAFFGetFirstWord_class_CString___char_const___char___int_]
jmp 0x426103
push 0
push 0
push 0xcf
mov ecx, ebp
call fcn.0043fc10
lea ecx, [esp + 0x10]
mov byte [esp + 0x3c8], 1
call fcn.00489b20
lea ecx, [esp + 0x14]
mov byte [esp + 0x3c8], 0
call fcn.00489b20
lea ecx, [esp + 0x3d4]
mov dword [esp + 0x3c8], 0xffffffff
call fcn.00489b20
mov eax, 1
jmp 0x428179
mov esi, dword [esp + 0x30]
test esi, esi
jg 0x428160
mov esi, 1
lea ecx, [esp + 0x3d4]
mov dword [esp + 0x3c8], 0xffffffff
call fcn.00489b20
mov eax, esi
mov ecx, dword [esp + 0x3c0]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x3bc
ret 8