Function at 0x422ab0
Capabilities:
Encode data using xor

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x48c2d8
push eax
mov eax, dword [esp + 0x14]
mov dword fs:[0], esp
sub esp, 0x4c
cmp eax, 4
push ebx
push ebp
push esi
push edi
mov ebp, ecx
jne 0x422b14
lea eax, [ebp + 0x37d8]
push eax
call fcn.0040b700
mov ecx, eax
call dword [sym.imp.rmDB.dll_public:_int___thiscall_CGameDBServer::GetUser_struct_USERDB__]
test eax, eax
je 0x422e88
add ebp, 0x37e9
push ebp
call dword [sym.imp.Staff2.dll_int___cdecl_STAFFGetStringEncodedInt_char__]
mov ecx, dword [esp + 0x70]
add esp, 4
cmp eax, dword [ecx]
je 0x4234d0
jmp 0x422e88
cmp eax, 0x35
jne 0x422e88
mov edi, dword [esp + 0x6c]
lea edx, [esp + 0x24]
xor eax, eax
mov bl, byte [edi + 0x34]
sub edi, edx
lea esi, [esp + eax + 0x24]
mov cl, byte [esi + edi]
xor cl, bl
inc eax
cmp eax, 0x34
mov byte [esi], cl
jb 0x422b2c
lea edi, [esp + 0x24]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x422e88
lea edi, [esp + 0x24]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp ecx, 0xe
ja 0x422e88
lea edi, [esp + 0x33]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x422e88
lea edi, [esp + 0x33]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp ecx, 0x10
ja 0x422e88
mov esi, dword [sym.imp.Staff2.dll_int___cdecl_STAFFGetStringEncodedInt_char__]
lea edx, [esp + 0x24]
push edx
call esi
mov dword [esp + 0x74], eax
lea eax, [esp + 0x37]
push eax
call esi
mov ecx, dword [esp + 0x78]
mov edx, dword [esp + 0x54]
add esp, 8
cmp ecx, edx
jne 0x422e88
cmp eax, dword [esp + 0x50]
jne 0x422e88
cmp bl, cl
jne 0x422e88
mov ecx, dword [ebp + 0x4504]
mov eax, dword [ecx + 0x32c4]
cmp eax, 0x84
jl 0x422f57
cmp eax, 0x88
jg 0x422f57
mov al, byte [esp + 0x56]
test al, al
mov byte [ebp + 0x4549], al
jg 0x422c01
mov byte [ebp + 0x4549], 1
lea edi, [esp + 0x33]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp ecx, 2
jbe 0x422e88
mov ecx, dword [esp + 0x48]
lea edx, [esp + 0x35]
push ecx
lea eax, [esp + 0x74]
push edx
push eax
mov ecx, ebp
call fcn.00422360
mov eax, dword [eax]
lea ecx, [esp + 0x33]
push eax
push ecx
call dword [sym.imp.MSVCRT.dll__stricmp]
add esp, 8
lea ecx, [esp + 0x70]
test eax, eax
setne bl
call fcn.00489b20
test bl, bl
jne 0x422e88
lea edi, [esp + 0x33]
or ecx, 0xffffffff
xor eax, eax
lea ebx, [ebp + 0x37d8]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, ebp
call fcn.0040b700
mov eax, dword [eax + 8]
mov esi, dword [sym.imp.rmDB.dll_public:_int___thiscall_CUserDB::GetUser_struct_USERDB__]
push ebx
mov ecx, eax
call esi
test eax, eax
je 0x422d0b
mov eax, dword [ebp + 0x4168]
mov ecx, ebp
test eax, eax
jne 0x422cea
call fcn.0040b700
mov ecx, dword [esp + 0x55]
mov edx, dword [esp + 0x54]
mov eax, dword [eax + 8]
push ecx
mov ecx, dword [esp + 0x48]
push edx
push ecx
lea edx, [esp + 0x30]
lea ecx, [esp + 0x3f]
push edx
push ecx
mov ecx, eax
call dword [sym.imp.rmDB.dll_public:_int___thiscall_CUserDB::InsertBattleArenaUser_char_const___char_const___char__unsigned_char__unsigned_char_]
test eax, eax
je 0x422e88
mov ecx, ebp
call fcn.0040b700
mov eax, dword [eax + 8]
push ebx
mov ecx, eax
call esi
test eax, eax
jne 0x422d55
jmp 0x422e88
call fcn.0040b700
mov edx, dword [esp + 0x44]
mov eax, dword [eax + 8]
push edx
lea ecx, [esp + 0x28]
lea edx, [esp + 0x37]
push ecx
push edx
mov ecx, eax
call dword [sym.imp.rmDB.dll_public:_int___thiscall_CUserDB::ChangeCharacter_char_const___char_const___char_]
jmp 0x422cca
mov ecx, ebp
call fcn.0040b700
mov ecx, dword [esp + 0x55]
mov edx, dword [esp + 0x54]
mov eax, dword [eax + 8]
push ecx
mov ecx, dword [esp + 0x48]
push edx
push ecx
lea edx, [esp + 0x30]
lea ecx, [esp + 0x3f]
push edx
push ecx
mov ecx, eax
call dword [sym.imp.rmDB.dll_public:_int___thiscall_CUserDB::InsertBattleArenaUser_char_const___char_const___char__unsigned_char__unsigned_char_]
test eax, eax
je 0x422e88
mov ecx, ebp
call fcn.0040b700
mov eax, dword [eax + 8]
push ebx
mov ecx, eax
call esi
test eax, eax
je 0x422e88
mov eax, dword [ebp + 0x4168]
test eax, eax
jne 0x422db2
mov eax, dword [ebp + 0x4504]
mov edx, dword [eax + 0x31e8]
mov ecx, dword [eax + 0x36a4]
cmp edx, ecx
jl 0x422db2
mov eax, ecx
lea ecx, [esp + 0x70]
push 4
push ecx
push 0x136
mov ecx, ebp
mov dword [esp + 0x7c], eax
call fcn.0043fc10
push 0
mov eax, 0x64
push 0
lea edx, [esp + 0x1c]
push 0x15
mov word [esp + 0x20], ax
mov word [esp + 0x22], ax
mov byte [esp + 0x24], 0
push edx
jmp 0x422e81
mov ecx, dword [ebp + 0x4504]
call fcn.00474800
mov esi, eax
mov eax, dword [ebp + 0x4168]
test eax, eax
jne 0x4234bd
cmp esi, 0xe
jge 0x422e9f
mov ecx, dword [ebp + 0x4504]
mov al, byte [ecx + 0x36d4]
test al, al
jne 0x422e27
lea eax, [esp + 0x14]
push eax
call sub.MFC42.DLL_CTime::GetTickCount
mov ecx, dword [eax]
push 0
mov dword [esp + 0x74], ecx
lea ecx, [esp + 0x74]
call sub.MFC42.DLL_CTime::GetLocalTm
lea esi, [esi + esi*2]
mov ecx, 0x348
push 4
lea edx, [esi + esi*4]
mov esi, dword [eax]
shl edx, 2
sub ecx, edx
lea edx, [esp + 0x14]
sub ecx, esi
push edx
mov dword [esp + 0x18], ecx
push 0x137
jmp 0x422e5b
call fcn.00474a90
test eax, eax
je 0x422e62
push ecx
mov ecx, esp
mov dword [esp + 0x74], esp
mov dword [ecx], 0x348
lea ecx, [esp + 0x18]
push ecx
mov ecx, eax
call fcn.00416140
mov edx, dword [eax]
lea eax, [esp + 0x70]
push 4
push eax
mov dword [esp + 0x78], edx
push 0x18a
mov ecx, ebp
call fcn.0043fc10
mov eax, 0x64
push 0
push 0
mov word [esp + 0x24], ax
mov word [esp + 0x26], ax
mov byte [esp + 0x28], 0
push 0x15
lea ecx, [esp + 0x28]
push ecx
mov ecx, ebp
call fcn.0043ed40
xor eax, eax
mov ecx, dword [esp + 0x5c]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x58
ret 8
cmp esi, 0x18
jl 0x4234bd
mov ecx, dword [ebp + 0x4504]
mov al, byte [ecx + 0x36d4]
test al, al
jne 0x422ef9
lea edx, [esp + 0x14]
push edx
call sub.MFC42.DLL_CTime::GetTickCount
mov eax, dword [eax]
push 0
lea ecx, [esp + 0x74]
mov dword [esp + 0x74], eax
call sub.MFC42.DLL_CTime::GetLocalTm
lea esi, [esi + esi*2]
mov edx, 0x1860
push 4
lea ecx, [esi + esi*4]
mov esi, dword [eax]
shl ecx, 2
sub edx, ecx
lea eax, [esp + 0x14]
sub edx, esi
push eax
mov dword [esp + 0x18], edx
push 0x137
jmp 0x422f2d
call fcn.00474a90
test eax, eax
je 0x422f34
push ecx
mov ecx, esp
mov dword [esp + 0x74], esp
mov dword [ecx], 0x348
lea ecx, [esp + 0x18]
push ecx
mov ecx, eax
call fcn.00416140
mov edx, dword [eax]
lea eax, [esp + 0x70]
push 4
push eax
mov dword [esp + 0x78], edx
push 0x18a
mov ecx, ebp
call fcn.0043fc10
mov eax, 0x64
push 0
push 0
mov word [esp + 0x24], ax
mov word [esp + 0x26], ax
mov byte [esp + 0x28], 0
push 0x15
lea ecx, [esp + 0x28]
jmp 0x422e80
cmp eax, 0xb4
jl 0x42340d
cmp eax, 0xbc
jg 0x42340d
mov al, byte [esp + 0x56]
test al, al
mov byte [ebp + 0x4549], al
jg 0x422f82
mov byte [ebp + 0x4549], 1
lea edi, [esp + 0x33]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp ecx, 2
ja 0x422fb9
push 0
mov eax, 0x64
push 0
lea edx, [esp + 0x24]
push 0x15
mov word [esp + 0x28], ax
mov word [esp + 0x2a], ax
mov byte [esp + 0x2c], 0
push edx
jmp 0x422e81
mov eax, dword [esp + 0x48]
lea ecx, [esp + 0x35]
push eax
lea edx, [esp + 0x74]
push ecx
push edx
mov ecx, ebp
call fcn.00422360
mov eax, dword [eax]
push eax
lea eax, [esp + 0x37]
push eax
call dword [sym.imp.MSVCRT.dll__stricmp]
add esp, 8
lea ecx, [esp + 0x70]
test eax, eax
setne bl
call fcn.00489b20
test bl, bl
je 0x423015
mov eax, 0x64
push 0
push 0
mov word [esp + 0x24], ax
mov word [esp + 0x26], ax
mov byte [esp + 0x28], 0
push 0x15
lea ecx, [esp + 0x28]
jmp 0x422e80
mov edx, dword [ebp + 0x4504]
mov eax, dword [edx + 0x32c4]
cmp eax, 0xb4
jne 0x423039
mov byte [esp + 0x6c], 1
mov byte [esp + 0x54], 1
mov byte [esp + 0x55], 1
jmp 0x423053
cmp eax, 0xb5
jne 0x4233ea
mov al, 0x18
mov byte [esp + 0x6c], 2
mov byte [esp + 0x54], al
mov byte [esp + 0x55], al
xor eax, eax
lea edi, [esp + 0x33]
or ecx, 0xffffffff
mov dword [esp + 0x70], eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov dword [esp + 0x10], eax
lea ebx, [ebp + 0x37d8]
mov eax, ecx
mov esi, edi
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
lea edx, [ebp + 0x37e9]
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x24]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov cl, byte [esp + 0x44]
mov byte [ebp + 0x37fc], cl
mov ecx, ebp
call fcn.0040b700
mov eax, dword [eax + 8]
mov edi, dword [sym.imp.rmDB.dll_public:_int___thiscall_CUserDB::GetUser_struct_USERDB__]
push ebx
mov ecx, eax
call edi
test eax, eax
je 0x4231e9
mov eax, dword [ebp + 0x4168]
mov ecx, ebp
test eax, eax
je 0x423175
call fcn.0040b700
mov edx, dword [esp + 0x44]
mov eax, dword [eax + 8]
push edx
lea ecx, [esp + 0x28]
lea edx, [esp + 0x37]
push ecx
push edx
mov ecx, eax
call dword [sym.imp.rmDB.dll_public:_int___thiscall_CUserDB::ChangeCharacter_char_const___char_const___char_]
test eax, eax
jne 0x423127
mov eax, 0x64
push 0
mov word [esp + 0x20], ax
mov word [esp + 0x22], ax
push 0
lea eax, [esp + 0x24]
push 0x15
mov byte [esp + 0x2c], 0
push eax
jmp 0x422e81
mov ecx, ebp
call fcn.0040b700
mov eax, dword [eax + 8]
push ebx
mov ecx, eax
call edi
test eax, eax
jne 0x42315d
mov eax, 0x64
push 0
push 0
mov word [esp + 0x24], ax
mov word [esp + 0x26], ax
mov byte [esp + 0x28], 0
push 0x15
lea ecx, [esp + 0x28]
jmp 0x422e80
mov edx, dword [ebp + 0x4504]
mov eax, dword [edx + 0x32c4]
mov word [ebp + 0x37fe], ax
jmp 0x4231fb
call fcn.0040b6f0
mov ecx, dword [esp + 0x48]
mov eax, dword [eax + 0x24]
push ecx
lea ecx, [ebp + 0x37e9]
lea edx, [ebp + 0x37da]
push ecx
push edx
mov ecx, eax
call dword [sym.imp.rmDB.dll_public:_int___thiscall_CBillBattleDB::FindUserBattleMatchEntry_char_const___char_const___int_]
mov esi, eax
test esi, esi
jne 0x4231a8
mov dword [esp + 0x70], 1
jmp 0x4231ff
movsx eax, byte [esp + 0x6c]
cmp esi, eax
je 0x4231d4
mov eax, 0x64
push 0
push 0
mov word [esp + 0x24], ax
mov word [esp + 0x26], ax
mov byte [esp + 0x28], 0
push 0x15
lea ecx, [esp + 0x28]
jmp 0x422e80
mov edx, dword [ebp + 0x4504]
mov eax, dword [edx + 0x32c4]
mov word [ebp + 0x37fe], ax
jmp 0x4231ff
mov dword [ebp + 0x4168], 0
mov dword [esp + 0x70], 1
mov esi, dword [esp + 0x10]
mov ecx, dword [ebp + 0x4504]
call fcn.004748d0
mov ecx, dword [ebp + 0x4168]
test ecx, ecx
jne 0x423291
movsx ecx, byte [esp + 0x6c]
cmp ecx, esi
jne 0x423222
cmp eax, 0x7c
jl 0x423291
cmp eax, 0xe
jl 0x42322c
cmp eax, 0x1d
jl 0x423291
mov ecx, dword [ebp + 0x4504]
call fcn.00474a90
test eax, eax
je 0x42326d
push ecx
lea edx, [esp + 0x18]
mov ecx, esp
mov dword [esp + 0x74], esp
push edx
mov dword [ecx], 0x348
mov ecx, eax
call fcn.00416140
mov eax, dword [eax]
lea ecx, [esp + 0x70]
push 4
push ecx
push 0x18a
mov ecx, ebp
mov dword [esp + 0x7c], eax
call fcn.0043fc10
push 0
mov eax, 0x64
push 0
lea edx, [esp + 0x24]
push 0x15
mov word [esp + 0x28], ax
mov word [esp + 0x2a], ax
mov byte [esp + 0x2c], 0
push edx
jmp 0x422e81
mov eax, dword [esp + 0x70]
test eax, eax
je 0x4234bd
mov eax, dword [ebp + 0x4504]
mov dword [ebp + 0x4398], 1
mov ecx, dword [eax + 0x31e8]
mov edx, dword [eax + 0x36a4]
cmp ecx, edx
jl 0x4232f7
lea eax, [esp + 0x70]
push 4
push eax
push 0x136
mov ecx, ebp
mov dword [esp + 0x7c], edx
call fcn.0043fc10
mov eax, 0x64
push 0
push 0
mov word [esp + 0x24], ax
mov word [esp + 0x26], ax
mov byte [esp + 0x28], 0
push 0x15
lea ecx, [esp + 0x28]
jmp 0x422e80
mov esi, dword [eax + 0x32c4]
mov ecx, ebp
call fcn.0040b700
mov edx, dword [esp + 0x6c]
mov ecx, dword [esp + 0x55]
mov eax, dword [eax + 8]
push esi
push edx
mov edx, dword [esp + 0x5c]
push ecx
mov ecx, dword [esp + 0x50]
push edx
push ecx
lea edx, [esp + 0x38]
lea ecx, [esp + 0x47]
push edx
push ecx
mov ecx, eax
call dword [sym.imp.rmDB.dll_public:_int___thiscall_CUserDB::InsertBattleMatchUser_char_const___char_const___char__unsigned_char__unsigned_char__char__int_]
test eax, eax
jne 0x423356
push 0
mov eax, 0x64
push 0
lea edx, [esp + 0x24]
push 0x15
mov word [esp + 0x28], ax
mov word [esp + 0x2a], ax
mov byte [esp + 0x2c], 0
push edx
jmp 0x422e81
mov ecx, ebp
call fcn.0040b700
mov eax, dword [eax + 8]
push ebx
mov ecx, eax
call edi
test eax, eax
jne 0x42338d
mov eax, 0x64
push 0
mov word [esp + 0x20], ax
mov word [esp + 0x22], ax
push 0
lea eax, [esp + 0x24]
push 0x15
mov byte [esp + 0x2c], 0
push eax
jmp 0x422e81
mov ecx, ebp
call fcn.0040b6f0
movsx ecx, byte [esp + 0x56]
movsx edx, byte [esp + 0x6c]
mov eax, dword [eax + 0x24]
push ecx
mov ecx, dword [esp + 0x4c]
push edx
push ecx
lea ecx, [ebp + 0x37e9]
lea edx, [ebp + 0x37da]
push ecx
push edx
mov ecx, eax
call dword [sym.imp.rmDB.dll_public:_int___thiscall_CBillBattleDB::InsertBattleMatchEntry_char_const___char_const___int__int__int_]
test eax, eax
jne 0x4234bd
mov eax, 0x64
push 0
mov word [esp + 0x20], ax
mov word [esp + 0x22], ax
push 0
lea eax, [esp + 0x24]
push 0x15
mov byte [esp + 0x2c], 0
push eax
jmp 0x422e81
mov eax, 0x64
push 0
push 0
mov word [esp + 0x24], ax
mov word [esp + 0x26], ax
mov byte [esp + 0x28], 0
push 0x15
lea ecx, [esp + 0x28]
jmp 0x422e80
mov ecx, dword [ecx + 0x3688]
mov eax, dword [esp + 0x48]
cmp ecx, eax
jne 0x422e88
lea edx, [esp + 0x33]
lea eax, [esp + 0x6c]
push edx
push eax
mov ecx, ebp
call fcn.00422400
mov edi, dword [esp + 0x6c]
or ecx, 0xffffffff
xor eax, eax
lea edx, [ebp + 0x37d8]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push edx
mov eax, ecx
mov esi, edi
mov edi, edx
mov dword [esp + 0x68], 0
shr ecx, 2
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.0040b700
mov ecx, eax
call dword [sym.imp.rmDB.dll_public:_int___thiscall_CGameDBServer::GetUser_struct_USERDB__]
test eax, eax
jne 0x423489
lea ecx, [esp + 0x6c]
mov dword [esp + 0x64], 0xffffffff
call fcn.00489b20
jmp 0x422e88
lea ecx, [esp + 0x24]
lea edx, [ebp + 0x37e9]
push ecx
push edx
call dword [sym.imp.MSVCRT.dll__stricmp]
add esp, 8
mov dword [esp + 0x64], 0xffffffff
test eax, eax
lea ecx, [esp + 0x6c]
je 0x4234b8
call fcn.00489b20
jmp 0x422e88
call fcn.00489b20
mov eax, dword [ebp]
push 1
push 0
push 0
push 0xf7
mov ecx, ebp
call dword [eax + 0xc]
mov eax, 1
jmp 0x422e8a