Function at 0x401a6c
Capabilities:
Get common file path
Print debug messages
Set current directory

Disassembly:
mov eax, 0x40d30e
call fcn.0040cbc0
sub esp, 0x2fc
mov eax, dword [0x41239c]
push ebx
push esi
mov esi, ecx
push edi
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x10], eax
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::constructor_void_]
lea eax, [ebp - 0x2c]
xor ebx, ebx
push eax
mov dword [ebp - 4], ebx
call fcn.00408de1
lea eax, [ebp - 0x2c]
mov dword [esp], str.kankanlite.dll
push eax
lea eax, [ebp - 0x48]
push eax
call fcn.004019d6
add esp, 0xc
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 1
call dword [sym.imp.MSVCP71.dll_public:_unsigned_short_int_const____thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::c_str_void_const]
push eax
lea ecx, [ebp - 0x308]
call fcn.00401a4c
push dword [eax]
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
lea eax, [ebp - 0x304]
cmp dword [ebp - 0x308], eax
je 0x401af3
push dword [ebp - 0x308]
call dword [sym.imp.MSVCR71.dll_free]
pop ecx
lea ecx, [ebp - 0x48]
call dword [sym.imp.MSVCP71.dll_public:_unsigned_short_int_const____thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::c_str_void_const]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [esi + 4], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x3f
mov dword [ebp - 0x254], eax
pop ecx
push dword [ebp - 0x254]
xor eax, eax
mov byte [ebp - 0x148], bl
lea edi, [ebp - 0x147]
rep stosd dword es:[edi], eax
push str.LoadLibrary_kankanlite.dll_return__d
stosw word es:[edi], ax
lea eax, [ebp - 0x148]
push 0xff
push eax
call dword [sym.imp.MSVCR71.dll__snprintf]
add esp, 0x10
lea eax, [ebp - 0x148]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push 0x40
pop ecx
xor eax, eax
mov byte [ebp - 0x24c], bl
lea edi, [ebp - 0x24b]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [ebp - 0x24c]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
cmp dword [esi + 4], ebx
jne 0x401b9e
push dword [ebp - 0x254]
push str.Load_KKL.dll_return__X
call fcn.00409225
pop ecx
pop ecx
mov byte [ebp - 0x24d], bl
jmp 0x401c3c
lea eax, [esi + 0xc]
mov dword [ebp - 0x284], eax
lea eax, [esi + 0x10]
mov dword [ebp - 0x27c], eax
lea eax, [esi + 0x30]
mov dword [ebp - 0x274], eax
lea eax, [esi + 0x48]
mov dword [ebp - 0x26c], eax
lea eax, [esi + 0x50]
mov dword [ebp - 0x264], eax
lea eax, [esi + 0x60]
mov dword [ebp - 0x280], str.init
mov dword [ebp - 0x278], str.uninit
mov dword [ebp - 0x270], str.set_product_identifier
mov dword [ebp - 0x268], str.get_peer_id
mov dword [ebp - 0x260], str.get_play_port
mov dword [ebp - 0x25c], eax
mov dword [ebp - 0x258], str.request_upgrade
xor edi, edi
push dword [ebp + edi*8 - 0x280]
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp eax, ebx
mov ecx, dword [ebp + edi*8 - 0x284]
mov dword [ecx], eax
je 0x401c72
inc edi
cmp edi, 6
jl 0x401c12
mov byte [ebp - 0x24d], 1
lea ecx, [ebp - 0x48]
mov byte [ebp - 4], bl
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::destructor_void_]
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x2c]
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::destructor_void_]
mov ecx, dword [ebp - 0xc]
mov al, byte [ebp - 0x24d]
pop edi
pop esi
mov dword fs:[0], ecx
mov ecx, dword [ebp - 0x10]
pop ebx
call fcn.0040cb97
leave
ret
push dword [ebp + edi*8 - 0x280]
push str.pfun__s_is_NULL
jmp 0x401b8c