Function at 0x4d4d50
Capabilities:
Log keystrokes via polling
Set current directory

Disassembly:
push ecx
push 0x90
call dword [sym.imp.USER32.dll_GetKeyState]
test al, 1
je 0x4d4d75
push 0x90
call dword [sym.imp.USER32.dll_GetAsyncKeyState]
test ax, ax
mov byte [esp + 3], 1
je 0x4d4d7a
mov byte [esp + 3], 0
push ebx
push ebp
push esi
push edi
call fcn.004ab6c0
mov edi, dword [sym.imp.MSVCR71.dll___p___argv]
call edi
mov eax, dword [eax]
mov ecx, dword [eax]
push 0
push 0
push 3
push 0
push 1
push 0x80000000
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
push 0x8cbdf8
push 0
mov esi, eax
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileTime]
mov eax, 0x8cbe00
mov ecx, 0x8cbdf8
call fcn.004d4af0
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call edi
mov edx, dword [eax]
mov esi, dword [edx]
push 0x5c
push esi
call dword [sym.imp.MSVCR71.dll_strrchr]
add esp, 8
test eax, eax
je 0x4d4ded
push esi
mov byte [eax], 0
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
call fcn.004b16e0
push str.Config.ini
call fcn.004d27d0
mov ebp, dword [esp + 0x24]
mov edi, dword [sym.imp.MSVCR71.dll_strstr]
push str._SAFEMODE
push ebp
call edi
add esp, 0xc
test eax, eax
setne al
test al, al
mov byte [0x8ccc24], al
je 0x4d4e45
mov eax, 0x320
push str.Config.ini
mov dword [0x8ccc18], eax
mov dword [0x8ccc20], eax
mov dword [0x8ccc1c], 0x258
call fcn.004d2ee0
add esp, 4
push str._BREAK
push ebp
call edi
add esp, 8
test eax, eax
je 0x4d4e61
add eax, 7
push eax
call dword [sym.imp.MSVCR71.dll_atoi]
add esp, 4
call fcn.004dc130
mov esi, dword [esp + 0x18]
push str.PiratesIcon
push esi
call dword [sym.imp.USER32.dll_LoadIconA]
mov ecx, dword [0x8ccc1c]
mov edx, dword [0x8ccc18]
push eax
push eax
xor eax, eax
mov al, byte [0x7283a4]
mov ebx, str.Sid_Meiers__Pirates_
push eax
push ecx
push edx
push esi
mov eax, str.Sid_Meiers_Pirates__21031
mov esi, 0x728b38
call fcn.004f5620
test eax, eax
jne 0x4d4ebb
mov bl, byte [esp + 0x13]
call fcn.004b09e0
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
pop ecx
ret 0x10
mov eax, 0x728b80
lea ecx, [esp + 0x20]
call fcn.00412df0
mov ebx, dword [esp + 0x20]
mov esi, dword [ebx - 4]
test esi, esi
jl 0x4d4f19
cmp ebx, dword [0x728ba0]
je 0x4d4f19
test esi, esi
je 0x4d4f0f
mov edi, 0x728ba0
call fcn.004f4a30
mov eax, dword [0x728ba0]
push esi
push ebx
push eax
call dword [sym.imp.MSVCR71.dll_memmove]
mov eax, dword [0x728ba0]
mov ecx, dword [eax - 4]
mov edi, dword [sym.imp.MSVCR71.dll_strstr]
add esp, 0xc
mov byte [eax + ecx], 0
jmp 0x4d4f19
mov ecx, 0x728ba0
call fcn.00412f90
lea eax, [ebx - 8]
test eax, eax
je 0x4d4f30
cmp eax, 0x8cccc8
je 0x4d4f30
push eax
call sub.MSVCR71.dll_void___cdecl_operator_delete___void__
add esp, 4
push str._UPDATE
push ebp
call edi
mov ecx, dword [0x8ccc1c]
test eax, eax
setne dl
xor eax, eax
mov al, byte [0x7283a4]
push 1
mov byte [0x8cbdf5], dl
mov edx, dword [0x8ccc18]
push eax
mov eax, dword [0x728b8c]
push ecx
push edx
push eax
call fcn.004d36c0
add esp, 0x1c
test al, al
jne 0x4d4f83
mov bl, byte [esp + 0x13]
call fcn.004b09e0
pop edi
pop esi
pop ebp
mov eax, 0x64
pop ebx
pop ecx
ret 0x10
cmp word [0x728b74], 1
mov ecx, dword [0x72837c]
mov edx, dword [0x728380]
mov dword [0x85c26c], ecx
mov dword [0x85c268], edx
jae 0x4d4faf
mov eax, str..pirates_savegame
call fcn.004f5b20
lea eax, [esp + 0x20]
push eax
call fcn.004f2b80
mov ecx, dword [eax]
push ecx
push str.Saves
call fcn.004f5940
mov eax, dword [esp + 0x2c]
add esp, 0xc
add eax, 0xfffffff8
je 0x4d4fe2
cmp eax, 0x8cccc8
je 0x4d4fe2
push eax
call sub.MSVCR71.dll_void___cdecl_operator_delete___void__
add esp, 4
push str.Config.ini
lea edx, [esp + 0x24]
push edx
lea eax, [esp + 0x20]
push eax
call fcn.004f2b80
add esp, 4
call fcn.00412a60
mov ecx, dword [eax]
push ecx
push str.Config
call fcn.004f5940
mov eax, dword [esp + 0x28]
add esp, 8
add eax, 0xfffffff8
je 0x4d5027
cmp eax, 0x8cccc8
je 0x4d5027
push eax
call sub.MSVCR71.dll_void___cdecl_operator_delete___void__
add esp, 4
mov eax, dword [esp + 0x18]
add eax, 0xfffffff8
mov esi, 0x8cccd0
mov dword [esp + 0x20], esi
je 0x4d5049
cmp eax, 0x8cccc8
je 0x4d5049
push eax
call sub.MSVCR71.dll_void___cdecl_operator_delete___void__
add esp, 4
push str.KeyMap.ini
lea edx, [esp + 0x24]
push edx
lea eax, [esp + 0x20]
push eax
call fcn.004f2b80
add esp, 4
call fcn.00412a60
mov ecx, dword [eax]
push ecx
push str.KeyMap
call fcn.004f5940
mov eax, dword [esp + 0x28]
add esp, 8
add eax, 0xfffffff8
je 0x4d508e
cmp eax, 0x8cccc8
je 0x4d508e
push eax
call sub.MSVCR71.dll_void___cdecl_operator_delete___void__
add esp, 4
mov eax, dword [esp + 0x18]
add eax, 0xfffffff8
mov dword [esp + 0x20], esi
je 0x4d50ab
cmp eax, 0x8cccc8
je 0x4d50ab
push eax
call sub.MSVCR71.dll_void___cdecl_operator_delete___void__
add esp, 4
mov al, byte [0x8cc929]
test al, al
jne 0x4d50d5
push 0x3f800000
push str.Firaxis_Logo.bik
call fcn.004abfd0
push 0x3f800000
push str.Logos.bik
call fcn.004abfd0
add esp, 0x10
call fcn.0042c000
mov al, byte [0x8ccc27]
test al, al
je 0x4d50f2
call fcn.004d44a0
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
pop ecx
ret 0x10
mov eax, dword [0x8ebf5c]
cmp eax, 6
je 0x4d5133
cmp eax, 9
je 0x4d5133
mov edx, dword [0x85c268]
mov eax, dword [0x85c26c]
push 0
push 0xffffffffffffffff
push edx
push eax
push 0
push 0
push 0x300
push 0x400
xor esi, esi
xor edi, edi
mov edx, str.titleScreen_Euro.dds
call fcn.004af4b0
add esp, 0x20
jmp 0x4d5188
mov esi, dword [0x85c268]
mov edi, dword [0x85c26c]
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x1c]
push edx
push 0
push 0
push str.titleScreen.dds
mov dword [esp + 0x34], 0x300
mov dword [esp + 0x2c], 0x400
call fcn.004ceb00
mov ecx, dword [esp + 0x34]
mov edx, dword [esp + 0x2c]
push 0
push 0xffffffffffffffff
push esi
push edi
push 0
push 0
push ecx
push edx
push 0
push 0
push eax
call fcn.004af500
add esp, 0x40
push 0
push 0
push 0
call fcn.004d1a40
mov al, byte [0x8ccc28]
add esp, 0xc
test al, al
je 0x4d51b1
call fcn.004cf4a0
push str.Config.ini
call fcn.004d2ee0
add esp, 4
call fcn.00428fd0
lea edi, [esp + 0x20]
call fcn.004f5dc0
mov ecx, 0x72880c
call fcn.00412ec0
mov eax, dword [esp + 0x20]
add eax, 0xfffffff8
je 0x4d51e2
cmp eax, 0x8cccc8
je 0x4d51e2
push eax
call sub.MSVCR71.dll_void___cdecl_operator_delete___void__
add esp, 4
mov esi, 0x728b38
call fcn.004f56f0
mov esi, eax
call fcn.004294c0
call fcn.004d44a0
mov bl, byte [esp + 0x13]
call fcn.004b09e0
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
pop ecx
ret 0x10