Function at 0x49d810
Capabilities:
Manipulate console buffer
Parse credit card information
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0x878
mov eax, dword [0x53e060]
xor eax, esp
mov dword [esp + 0x874], eax
push esi
mov esi, dword [ebp + 8]
lea eax, [esp + 0x2c]
push edi
push 0x806
push 0
push eax
mov edi, edx
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x2c], esi
call fcn.004c08f0
add esp, 0xc
mov dword [esp + 0x838], 0
mov dword [esp + 0x83c], 0
mov dword [esp + 0x840], 0
test edi, edi
je 0x49e24c
cmp byte [edi], 0
je 0x49e24c
push esi
push 0
push edi
lea eax, [esp + 0x3c]
push 0x806
push eax
call fcn.00406200
mov ecx, dword [eax]
push dword [eax + 4]
or ecx, 2
push ecx
call fcn.004d1e4e
or ecx, 0xffffffff
add esp, 0x1c
test eax, eax
cmovs eax, ecx
mov dword [esp + 0x840], eax
cmp eax, 0x805
ja 0x49d8c9
lea eax, [esp + 0x30]
mov dword [esp + 0x83c], eax
jmp 0x49d959
push ecx
push 0xd1
mov edx, str.D:game_2023RO_2023_rathena_master_srccommon_showmsg.cpp
mov ecx, 0xc
call fcn.0049e7d0
mov esi, eax
add esp, 4
mov edx, str.D:game_2023RO_2023_rathena_master_srccommon_showmsg.cpp
mov ecx, 0x401
mov dword [esi], 0
mov dword [esi + 4], 0
push 0xd1
mov dword [esi + 8], 0x400
call fcn.0049e7d0
add esp, 8
mov dword [esi], eax
mov dword [esi + 4], eax
mov dword [esp + 0x838], esi
push dword [esp + 0x20]
push edi
push esi
push ecx
call fcn.0049fb90
mov ecx, dword [esp + 0x848]
mov dword [esp + 0x850], eax
mov eax, dword [ecx + 4]
mov byte [eax], 0
mov eax, dword [ecx]
mov dword [esp + 0x84c], eax
mov eax, dword [esp + 0x850]
inc eax
push eax
push str.showmsg:_dynamic_buffer_used__increase_the_static_buffer_size_to__d_or_more._n
call fcn.0049e770
add esp, 0x18
mov edi, dword [esp + 0x10]
push edi
call dword [sym.imp.KERNEL32.dll_GetFileType]
cmp eax, 2
je 0x49d9a4
cmp dword [0x540f08], 0
je 0x49d9a4
push 0
lea eax, [esp + 0x20]
push eax
push dword [esp + 0x848]
push dword [esp + 0x848]
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
xor eax, eax
pop edi
pop esi
mov ecx, dword [esp + 0x874]
xor ecx, esp
call fcn.004be4ac
mov esp, ebp
pop ebp
ret
mov esi, dword [esp + 0x83c]
push 0x1b
push esi
call fcn.004bff60
add esp, 8
mov dword [esp + 0x14], eax
test eax, eax
je 0x49e1b9
push 0
mov edi, eax
lea eax, [esp + 0x20]
push eax
sub edi, esi
push edi
push esi
push dword [esp + 0x20]
call dword [sym.imp.KERNEL32.dll_WriteConsoleA]
test eax, eax
jne 0x49d9f2
push eax
lea eax, [esp + 0x20]
push eax
push edi
push esi
mov esi, dword [esp + 0x20]
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x49d9f6
mov esi, dword [esp + 0x10]
mov edi, dword [esp + 0x14]
cmp byte [edi + 1], 0x5b
je 0x49da2e
push 0
lea eax, [esp + 0x20]
push eax
push 1
push edi
push esi
call dword [sym.imp.KERNEL32.dll_WriteConsoleA]
test eax, eax
jne 0x49e19b
push eax
lea eax, [esp + 0x20]
push eax
push 1
push edi
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x49e19b
lea eax, [esp + 0x848]
mov byte [esp + 0xe], 0
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
xorps xmm0, xmm0
add edi, 2
movaps xmmword [esp + 0x860], xmm0
movzx eax, byte [edi]
push eax
call fcn.004d2bc0
add esp, 4
test eax, eax
je 0x49da80
movzx eax, byte [esp + 0xe]
lea edx, [esp + 0x860]
mov cl, byte [edi]
add edx, eax
sub cl, 0x30
movzx eax, byte [edx]
shl al, 4
or cl, al
inc edi
mov byte [edx], cl
jmp 0x49da50
mov al, byte [edi]
cmp al, 0x3b
jne 0x49dabc
mov al, byte [esp + 0xe]
cmp al, 0x10
jae 0x49da97
inc al
inc edi
mov byte [esp + 0xe], al
jmp 0x49da50
push 0xf
lea eax, [esp + 0x865]
push eax
lea eax, [esp + 0x868]
push eax
call fcn.004c0370
add esp, 0xc
mov byte [esp + 0x86f], 0
inc edi
jmp 0x49da50
mov dword [esp + 0x14], edi
cmp al, 0x6d
jne 0x49dc96
mov ax, word [esp + 0x850]
xor cl, cl
mov byte [esp + 0xf], cl
mov esi, 0x80
mov edi, 0xfff7
movzx ecx, cl
mov cl, byte [esp + ecx + 0x860]
mov dl, cl
and dl, 0xf0
jne 0x49db2c
test cl, cl
jne 0x49daff
mov eax, 7
jmp 0x49dc5e
cmp cl, 1
jne 0x49db0d
or ax, 8
jmp 0x49dc5e
cmp cl, 5
jne 0x49db1a
or ax, si
jmp 0x49dc5e
cmp cl, 7
jne 0x49dc66
xor ax, 0x77
jmp 0x49dc5e
cmp dl, 0x20
jne 0x49db50
cmp cl, 1
jne 0x49db3e
and ax, di
jmp 0x49dc5e
cmp cl, 5
jne 0x49db1a
mov ecx, 0xff7f
and ax, cx
jmp 0x49dc5e
cmp dl, 0x30
jne 0x49dbdc
and cl, 0xf
cmp cl, 9
jne 0x49db6f
or ax, 8
mov word [esp + 0x850], ax
jmp 0x49db74
cmp cl, 7
jbe 0x49db8f
mov eax, dword [esp + 0x850]
mov cl, 7
and eax, 0xfff8
mov word [esp + 0x850], ax
movzx edx, ax
jmp 0x49dbab
mov eax, dword [esp + 0x850]
and eax, 0xfff8
movzx edx, ax
mov word [esp + 0x850], ax
test cl, 1
jbe 0x49dbb9
or edx, 4
mov ax, dx
mov word [esp + 0x850], ax
test cl, 2
jbe 0x49dbca
or ax, 2
mov word [esp + 0x850], ax
test cl, 4
jbe 0x49dc66
or ax, 1
jmp 0x49dc5e
cmp dl, 0x40
jne 0x49dc66
and cl, 0xf
cmp cl, 9
jne 0x49dbfa
or ax, si
mov word [esp + 0x850], ax
jmp 0x49dbff
cmp cl, 7
jbe 0x49dc1a
mov eax, dword [esp + 0x850]
mov cl, 7
and eax, 0xff8f
mov word [esp + 0x850], ax
movzx edx, ax
jmp 0x49dc36
mov eax, dword [esp + 0x850]
and eax, 0xff8f
movzx edx, ax
mov word [esp + 0x850], ax
test cl, 1
jbe 0x49dc44
or edx, 0x40
mov ax, dx
mov word [esp + 0x850], ax
test cl, 2
jbe 0x49dc55
or ax, 0x20
mov word [esp + 0x850], ax
test cl, 4
jbe 0x49dc66
or ax, 0x10
mov word [esp + 0x850], ax
mov cl, byte [esp + 0xf]
add cl, 1
mov byte [esp + 0xf], cl
cmp cl, byte [esp + 0xe]
jbe 0x49dae0
push dword [esp + 0x850]
mov esi, dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
mov edi, dword [esp + 0x14]
jmp 0x49e19b
cmp al, 0x4a
jne 0x49dd5b
movzx eax, byte [esp + 0xe]
mov cl, byte [esp + eax + 0x860]
mov al, cl
and cl, 0xf
shr al, 4
mov dl, al
shl al, 2
add dl, al
xor eax, eax
add dl, dl
mov dword [esp + 0x24], eax
add dl, cl
cmp dl, 1
jne 0x49dcec
movsx ecx, word [esp + 0x84e]
movsx eax, word [esp + 0x848]
movsx edi, word [esp + 0x84c]
mov esi, dword [esp + 0x24]
inc edi
imul ecx, eax
add edi, ecx
jmp 0x49dd3a
movsx edi, word [esp + 0x84a]
cmp dl, 2
jne 0x49dd15
mov esi, dword [esp + 0x24]
movsx eax, word [esp + 0x848]
push esi
push dword [esp + 0x14]
imul edi, eax
call dword [sym.imp.KERNEL32.dll_SetConsoleCursorPosition]
jmp 0x49dd3a
movsx eax, word [esp + 0x84e]
mov esi, dword [esp + 0x84c]
sub edi, eax
movsx eax, word [esp + 0x848]
imul edi, eax
movsx eax, si
mov dword [esp + 0x24], esi
sub edi, eax
lea eax, [esp + 0x28]
push eax
push esi
push edi
push dword [esp + 0x85c]
push dword [esp + 0x20]
call dword [sym.imp.KERNEL32.dll_FillConsoleOutputAttribute]
lea eax, [esp + 0x28]
jmp 0x49ddf2
cmp al, 0x4b
jne 0x49de0a
movzx eax, byte [esp + 0xe]
mov cl, byte [esp + eax + 0x860]
mov al, cl
and cl, 0xf
shr al, 4
mov dl, al
shl al, 2
add dl, al
xor eax, eax
add dl, dl
mov word [esp + 0x20], ax
mov ax, word [esp + 0x84e]
add dl, cl
mov word [esp + 0x22], ax
cmp dl, 1
jne 0x49dda9
mov eax, dword [esp + 0x84c]
mov esi, dword [esp + 0x20]
inc eax
jmp 0x49ddd0
cmp dl, 2
jne 0x49ddbc
movzx eax, word [esp + 0x848]
mov esi, dword [esp + 0x20]
jmp 0x49ddd3
mov esi, dword [esp + 0x84c]
mov eax, dword [esp + 0x848]
mov dword [esp + 0x20], esi
sub eax, esi
movzx eax, ax
movsx edi, ax
lea eax, [esp + 0x2c]
push eax
push esi
push edi
push dword [esp + 0x85c]
push dword [esp + 0x20]
call dword [sym.imp.KERNEL32.dll_FillConsoleOutputAttribute]
lea eax, [esp + 0x2c]
push eax
push esi
push edi
push 0x20
push dword [esp + 0x20]
call dword [sym.imp.KERNEL32.dll_FillConsoleOutputCharacterA]
mov edi, dword [esp + 0x14]
jmp 0x49e19b
cmp al, 0x48
je 0x49e0dd
cmp al, 0x66
je 0x49e0dd
cmp al, 0x73
je 0x49e19b
cmp al, 0x75
je 0x49e19b
cmp al, 0x41
jne 0x49de77
movzx eax, byte [esp + 0xe]
mov al, byte [esp + eax + 0x860]
test al, al
je 0x49de51
movzx ecx, al
mov eax, ecx
shr eax, 4
and ecx, 0xf
lea eax, [eax + eax*4]
lea eax, [ecx + eax*2]
jmp 0x49de56
mov eax, 1
sub word [esp + 0x84e], ax
jns 0x49de6a
xor eax, eax
mov word [esp + 0x84e], ax
push dword [esp + 0x84c]
push esi
jmp 0x49e195
cmp al, 0x42
jne 0x49dedd
movzx eax, byte [esp + 0xe]
mov al, byte [esp + eax + 0x860]
test al, al
je 0x49de9e
movzx ecx, al
mov eax, ecx
shr eax, 4
and ecx, 0xf
lea eax, [eax + eax*4]
lea ecx, [ecx + eax*2]
jmp 0x49dea3
mov ecx, 1
mov ax, word [esp + 0x84e]
add ax, cx
mov word [esp + 0x84e], ax
cmp ax, word [esp + 0x84a]
jl 0x49ded0
mov eax, dword [esp + 0x84a]
dec eax
mov word [esp + 0x84e], ax
push dword [esp + 0x84c]
push esi
jmp 0x49e195
cmp al, 0x43
jne 0x49df43
movzx eax, byte [esp + 0xe]
mov al, byte [esp + eax + 0x860]
test al, al
je 0x49df04
movzx ecx, al
mov eax, ecx
shr eax, 4
and ecx, 0xf
lea eax, [eax + eax*4]
lea ecx, [ecx + eax*2]
jmp 0x49df09
mov ecx, 1
mov ax, word [esp + 0x84c]
add ax, cx
mov word [esp + 0x84c], ax
cmp ax, word [esp + 0x848]
jl 0x49df36
mov eax, dword [esp + 0x848]
dec eax
mov word [esp + 0x84c], ax
push dword [esp + 0x84c]
push esi
jmp 0x49e195
cmp al, 0x44
jne 0x49df90
movzx eax, byte [esp + 0xe]
mov al, byte [esp + eax + 0x860]
test al, al
je 0x49df6a
movzx ecx, al
mov eax, ecx
shr eax, 4
and ecx, 0xf
lea eax, [eax + eax*4]
lea eax, [ecx + eax*2]
jmp 0x49df6f
mov eax, 1
sub word [esp + 0x84c], ax
jns 0x49df83
xor eax, eax
mov word [esp + 0x84c], ax
push dword [esp + 0x84c]
push esi
jmp 0x49e195
cmp al, 0x45
jne 0x49dfee
movzx eax, byte [esp + 0xe]
mov al, byte [esp + eax + 0x860]
test al, al
je 0x49dfcf
movzx ecx, al
mov eax, ecx
and ecx, 0xf
shr eax, 4
lea eax, [eax + eax*4]
lea ecx, [ecx + eax*2]
mov ax, word [esp + 0x84e]
add ax, cx
xor ecx, ecx
mov word [esp + 0x84c], cx
jmp 0x49deae
mov ax, word [esp + 0x84e]
mov ecx, 1
add ax, cx
xor ecx, ecx
mov word [esp + 0x84c], cx
jmp 0x49deae
cmp al, 0x46
jne 0x49e04c
movzx eax, byte [esp + 0xe]
mov al, byte [esp + eax + 0x860]
test al, al
je 0x49e02d
movzx ecx, al
mov eax, ecx
and ecx, 0xf
shr eax, 4
lea eax, [eax + eax*4]
lea eax, [ecx + eax*2]
sub word [esp + 0x84e], ax
mov eax, 0
mov word [esp + 0x84c], ax
jmp 0x49de5e
mov eax, 1
sub word [esp + 0x84e], ax
mov eax, 0
mov word [esp + 0x84c], ax
jmp 0x49de5e
cmp al, 0x47
jne 0x49e0b7
movzx eax, byte [esp + 0xe]
mov dl, byte [esp + eax + 0x860]
test dl, dl
je 0x49e082
mov al, dl
and dl, 0xf
shr al, 4
movzx eax, al
mov cx, ax
shl ax, 2
add cx, ax
movzx eax, dl
add cx, cx
dec ax
add cx, ax
jmp 0x49e084
xor ecx, ecx
mov word [esp + 0x84c], cx
cmp cx, word [esp + 0x848]
jl 0x49de6a
mov eax, dword [esp + 0x848]
dec eax
mov word [esp + 0x84c], ax
push dword [esp + 0x84c]
push esi
jmp 0x49e195
cmp al, 0x4c
je 0x49e19b
cmp al, 0x4d
je 0x49e19b
cmp al, 0x40
je 0x49e19b
cmp al, 0x50
je 0x49e19b
dec edi
jmp 0x49e19b
mov ch, byte [esp + 0xe]
lea esi, [esp + 0x860]
movzx eax, ch
add esi, eax
mov cl, byte [esi]
test cl, cl
je 0x49e115
mov al, cl
and cl, 0xf
shr al, 4
movzx eax, al
mov dx, ax
shl ax, 2
add dx, ax
movzx eax, cl
add dx, dx
dec dx
add dx, ax
jmp 0x49e117
xor edx, edx
mov word [esp + 0x84c], dx
test ch, ch
je 0x49e14c
mov al, byte [esi - 1]
test al, al
je 0x49e14c
shr al, 4
movzx eax, al
mov cx, ax
shl ax, 2
add cx, ax
mov al, byte [esi - 1]
and al, 0xf
add cx, cx
movzx eax, al
dec ax
add cx, ax
jmp 0x49e14e
xor ecx, ecx
mov word [esp + 0x84e], cx
cmp dx, word [esp + 0x848]
jl 0x49e170
mov ecx, dword [esp + 0x848]
dec ecx
mov word [esp + 0x84e], cx
cmp cx, word [esp + 0x84a]
jl 0x49e18a
mov eax, dword [esp + 0x84a]
dec eax
mov word [esp + 0x84e], ax
push dword [esp + 0x84c]
push dword [esp + 0x14]
call dword [sym.imp.KERNEL32.dll_SetConsoleCursorPosition]
lea esi, [edi + 1]
push 0x1b
push esi
call fcn.004bff60
add esp, 8
mov dword [esp + 0x14], eax
test eax, eax
jne 0x49d9c2
mov edi, dword [esp + 0x10]
cmp byte [esi], 0
je 0x49e1fe
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x49e1c3
push 0
lea eax, [esp + 0x20]
sub ecx, edx
push eax
push ecx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_WriteConsoleA]
test eax, eax
jne 0x49e1fe
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x49e1e5
push 0
lea eax, [esp + 0x20]
sub ecx, edx
push eax
push ecx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov esi, dword [esp + 0x838]
test esi, esi
je 0x49e24c
mov ecx, dword [esi]
mov edx, str.D:game_2023RO_2023_rathena_master_srccommon_strlib.cpp
push str.StringBuf_Destroy
push 0x42a
call fcn.0049eb10
push str.StringBuf_Free
push 0x433
mov edx, str.D:game_2023RO_2023_rathena_master_srccommon_strlib.cpp
mov dword [esi], 0
mov ecx, esi
mov dword [esi + 4], 0
mov dword [esi + 8], 0
call fcn.0049eb10
add esp, 0x10
mov ecx, dword [esp + 0x87c]
xor eax, eax
pop edi
pop esi
xor ecx, esp
call fcn.004be4ac
mov esp, ebp
pop ebp
ret