Function at 0x404bc0
Capabilities:
Encode data using xor
Get common file path
Read file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4269bb
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x4cc
push ebx
push ebp
push esi
push edi
mov ebp, ecx
mov al, byte [ebp + 4]
test al, al
mov dword [esp + 0x34], ebp
jne 0x405298
mov eax, dword [ebp + 8]
push eax
lea ecx, [esp + 0x2dc]
push str.._chart__s
push ecx
call fcn.00409160
mov byte [esp + 0x3e4], 0
xor eax, eax
mov ecx, 0x3f
lea edi, [esp + 0x3e5]
rep stosd dword es:[edi], eax
add esp, 0xc
lea edx, [esp + 0x3d8]
stosw word es:[edi], ax
push edx
push 0x100
stosb byte es:[edi], al
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
lea eax, [esp + 0xb4]
push eax
lea ecx, [esp + 0x2dc]
push ecx
call fcn.00425ca0
mov ax, word [esp + 0xc4]
add esp, 8
test ax, ax
je 0x4052b0
jl 0x4052b0
mov ebx, dword [esp + 0xc8]
push 0
push 0x80
push 3
push 0
push 0
push closesocket
lea edx, [esp + 0x2f0]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
test eax, eax
mov dword [esp + 0x40], eax
jne 0x404ceb
mov eax, dword [ebp + 8]
push eax
lea ecx, [esp + 0xdc]
push str.HANDLE_ERROR____s
push ecx
call fcn.00409160
add esp, 0xc
push 0
push str.ERROR
lea edx, [esp + 0xe0]
push edx
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
push 0
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
mov ecx, dword [esp + 0x4dc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, ebx
cdq
and edx, 0xfff
add eax, edx
mov edi, eax
sar edi, 0xc
push 4
inc edi
push 0x3000
shl edi, 0xc
push edi
push 0
mov dword [esp + 0x54], edi
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov ecx, dword [esp + 0x40]
mov esi, eax
push 0
lea eax, [ebp + 0x3c]
push eax
push ebx
push esi
push ecx
mov dword [esp + 0x34], esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esi + 0x20]
test eax, eax
mov dword [esp + 0x24], 0
mov dword [esp + 0x30], eax
mov ebx, 0x24
jle 0x404d99
lea edx, [eax*8]
push edx
call fcn.004092b0
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x34]
add esp, 4
xor edi, edi
test eax, eax
jle 0x404d88
mov eax, dword [ebx + esi]
mov ecx, dword [esp + 0x24]
mov dword [ecx + edi*8], eax
push eax
mov ecx, ebp
call fcn.00403f00
mov edx, dword [esp + 0x24]
mov dword [edx + edi*8 + 4], eax
mov eax, dword [esp + 0x30]
add ebx, 4
inc edi
cmp edi, eax
jl 0x404d62
mov eax, dword [ebx + esi]
mov edi, dword [esp + 0x44]
mov dword [ebp + 0x34], eax
mov eax, dword [esp + 0x30]
add ebx, 4
xor ecx, ecx
test eax, eax
jle 0x404dc4
mov edx, dword [esp + 0x24]
add edx, 4
mov dword [esp + 0x14], eax
jmp 0x404db0
mov edx, dword [esp + 0x1c]
add ecx, dword [edx]
add edx, 8
mov dword [esp + 0x1c], edx
dec dword [esp + 0x14]
jne 0x404dac
cmp ecx, 0xd
jae 0x404e2c
push ecx
mov ecx, dword [ebp + 8]
push 0xd
push ecx
lea edx, [esp + 0xe4]
push str.table_load_fail__s____Size_mismatch_structSize___d_TypetotalSize___d
push edx
call fcn.00409160
add esp, 0x14
push 0
push str.ERROR
lea eax, [esp + 0xe0]
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
push 0x4000
push edi
mov edi, dword [sym.imp.KERNEL32.dll_VirtualFree]
push esi
mov byte [ebp + 4], 0
call edi
push 0x8000
push 0
push esi
call edi
xor al, al
mov ecx, dword [esp + 0x4dc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret
xor ecx, ecx
mov dword [esp + 0x4c], ecx
mov dword [esp + 0x50], ecx
mov dword [esp + 0x54], ecx
cmp eax, ecx
mov dword [esp + 0x4e4], ecx
jle 0x404efa
lea ecx, [esp + 0x70]
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x14], eax
jmp 0x404e60
mov byte [esp + 0x70], 0
xor eax, eax
mov ecx, 0xf
lea edi, [esp + 0x71]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ax, word [ebx + esi]
movzx eax, ax
mov ecx, eax
mov edx, ecx
shr ecx, 2
add ebx, 2
add esi, ebx
lea edi, [esp + 0x70]
rep movsd dword es:[edi], dword [esi]
push eax
mov ecx, edx
add ebx, eax
lea eax, [esp + 0x74]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call fcn.00403f70
mov edx, dword [esp + 0x54]
mov esi, dword [esp + 0x58]
add esp, 8
test edx, edx
je 0x404ed4
mov ecx, dword [esp + 0x54]
mov eax, esi
sub eax, edx
sub ecx, edx
sar eax, 2
sar ecx, 2
cmp eax, ecx
jae 0x404ed4
lea ecx, [esp + 0x70]
mov dword [esi], ecx
add esi, 4
mov dword [esp + 0x50], esi
jmp 0x404ee5
lea edx, [esp + 0x1c]
push edx
push 1
push esi
lea ecx, [esp + 0x54]
call fcn.00404920
mov eax, dword [esp + 0x14]
mov esi, dword [esp + 0x20]
dec eax
mov dword [esp + 0x14], eax
jne 0x404e60
xor ecx, ecx
mov eax, dword [ebp + 0x34]
imul eax, eax, 0xd
cdq
and edx, 0xfff
add eax, edx
sar eax, 0xc
push 4
inc eax
shl eax, 0xc
push 0x103000
push eax
push ecx
mov dword [ebp + 0x38], eax
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov ecx, dword [ebp + 0x38]
mov edx, ecx
shr ecx, 2
mov edi, eax
xor eax, eax
mov dword [ebp + 0x2c], edi
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov ecx, dword [ebp + 0x34]
xor eax, eax
cmp ecx, eax
mov dword [esp + 0x3c], eax
jle 0x40524a
mov dword [esp + 0x14], eax
nop
mov eax, dword [esp + 0x24]
mov ecx, dword [eax + 4]
add eax, 4
mov eax, ecx
shr ecx, 2
add esi, ebx
mov dword [esp + 0x18], 0
lea edi, [esp + 0x18]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, dword [ebp + 0x14]
and ecx, 3
test eax, eax
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0x18]
lea ecx, [ebp + 0x10]
mov dword [esp + 0x1c], esi
jne 0x404f8c
xor edi, edi
jmp 0x404f94
mov edi, dword [ecx + 8]
sub edi, eax
sar edi, 2
test eax, eax
je 0x404fb1
mov edx, dword [ecx + 0xc]
sub edx, eax
sar edx, 2
cmp edi, edx
jae 0x404fb1
mov eax, dword [ecx + 8]
mov dword [eax], esi
add eax, 4
mov dword [ecx + 8], eax
jmp 0x404fc1
mov eax, dword [ecx + 8]
lea edx, [esp + 0x1c]
push edx
push 1
push eax
call fcn.00404920
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x70]
push ecx
lea edi, [ebp + 0x20]
mov ecx, edi
call fcn.00404220
mov edx, dword [ebp + 0x24]
cmp edx, dword [eax]
je 0x405025
push 0x42d0e8
mov ecx, 0x42d0e8
call fcn.00409830
test eax, eax
je 0x405025
mov eax, dword [ebp + 8]
push esi
push eax
lea ecx, [esp + 0xe0]
push str._s_Table_Duplication_Error_ID:__d_
push ecx
call fcn.00409160
add esp, 0x10
push 0
push str.ERROR
lea edx, [esp + 0xe0]
push edx
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
jmp 0x405227
mov eax, dword [ebp + 0x2c]
add eax, dword [esp + 0x14]
mov dword [esp + 0x18], eax
mov dword [esp + 0x60], eax
lea eax, [esp + 0x5c]
push eax
lea ecx, [esp + 0x68]
push ecx
mov ecx, edi
mov dword [esp + 0x30], 0
mov dword [esp + 0x64], esi
call fcn.00404860
mov esi, dword [esp + 0x24]
mov edx, dword [esp + 0x30]
add esi, 4
mov dword [esp + 0x2c], esi
mov dword [esp + 0x1c], edx
mov ecx, dword [esi]
mov eax, dword [esp + 0x28]
add eax, ecx
cmp eax, 0xd
jle 0x4050a1
mov ecx, dword [esi - 4]
cmp ecx, 7
je 0x405087
cmp ecx, 0xc
je 0x405087
mov eax, dword [esi]
add ebx, eax
jmp 0x40520d
mov ecx, dword [esp + 0x20]
mov dx, word [ebx + ecx]
add dx, 2
movzx ecx, dx
add ebx, ecx
mov dword [esp + 0x28], eax
jmp 0x405211
mov eax, dword [esi - 4]
cmp eax, 7
je 0x4050d4
cmp eax, 0xc
je 0x4050d4
mov edx, dword [esp + 0x20]
mov edi, dword [esp + 0x18]
mov eax, ecx
shr ecx, 2
lea esi, [ebx + edx]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x2c]
add ebx, dword [ecx]
mov esi, ecx
jmp 0x405201
mov edx, dword [esp + 0x20]
mov eax, dword [ebp + 0x30]
xor edi, edi
mov di, word [ebx + edx]
add ebx, 2
test eax, eax
mov dword [esp + 0x38], ebx
mov dword [esp + 0x58], edi
jne 0x4050ff
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_HeapCreate]
mov dword [ebp + 0x30], eax
mov eax, dword [ebp + 0x30]
test eax, eax
je 0x4051fc
movzx ebx, di
lea ecx, [ebx + 1]
push ecx
push 0
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebp, eax
test ebp, ebp
je 0x4051b7
mov edx, dword [esp + 0x38]
mov eax, dword [esp + 0x20]
mov ecx, ebx
lea esi, [edx + eax]
mov edx, ecx
shr ecx, 2
mov byte [ebx + ebp], 0
mov edi, ebp
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
test ebx, ebx
rep movsb byte es:[edi], byte [esi]
je 0x405177
mov eax, ebp
lea edx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x405150
sub eax, edx
mov dword [esp + 0x64], eax
je 0x405177
xor eax, eax
test ebx, ebx
jle 0x40516e
xor byte [eax + ebp], 0x11
inc eax
cmp eax, ebx
jl 0x405165
push ebp
call fcn.00425b20
add esp, 4
mov esi, dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
push 0
push 0
push 0xffffffffffffffff
push ebp
push 0
push 0xfde9
call esi
mov edi, eax
lea eax, [edi + edi]
push eax
call fcn.004092b0
add esp, 4
push edi
mov ebx, eax
push ebx
push 0xffffffffffffffff
push ebp
push 0
push 0xfde9
call esi
mov ecx, dword [esp + 0x18]
mov edi, dword [esp + 0x58]
mov dword [ecx], ebx
jmp 0x4051f0
mov edx, dword [esp + 0x3c]
mov eax, dword [esp + 0x34]
mov ecx, dword [eax + 8]
push edx
push ecx
lea edx, [esp + 0x1e0]
push str.LoadTbl___fail_HeapAlloc_file___s___record___d
push edx
call fcn.00409160
add esp, 0x10
push 0
push str.ERROR
lea eax, [esp + 0x1e0]
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
mov ebp, dword [esp + 0x34]
mov ebx, dword [esp + 0x38]
mov esi, dword [esp + 0x2c]
movzx ecx, di
add ebx, ecx
mov edx, dword [esp + 0x18]
mov eax, dword [esi]
add edx, eax
mov dword [esp + 0x18], edx
add dword [esp + 0x28], eax
mov eax, dword [esp + 0x1c]
add esi, 8
dec eax
mov dword [esp + 0x2c], esi
mov dword [esp + 0x1c], eax
jne 0x405064
mov eax, dword [esp + 0x3c]
mov edx, dword [esp + 0x14]
mov ecx, dword [ebp + 0x34]
mov esi, dword [esp + 0x20]
inc eax
add edx, 0xd
cmp eax, ecx
mov dword [esp + 0x3c], eax
mov dword [esp + 0x14], edx
jl 0x404f50
mov edx, dword [esp + 0x40]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x24]
test eax, eax
je 0x405266
push eax
call fcn.00409290
add esp, 4
mov eax, dword [esp + 0x44]
mov edi, dword [sym.imp.KERNEL32.dll_VirtualFree]
push 0x4000
push eax
push esi
call edi
push 0x8000
push 0
push esi
call edi
mov eax, dword [esp + 0x4c]
test eax, eax
mov byte [ebp + 4], 1
je 0x405298
push eax
call fcn.004087f0
add esp, 4
mov al, 1
mov ecx, dword [esp + 0x4dc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp + 8]
push ecx
lea edx, [esp + 0x1dc]
push str.LoadFail:_LinkFail_None_File_____s
push edx
call fcn.00409160
add esp, 0xc
push 0
push str.ERROR
lea eax, [esp + 0x1e0]
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
mov ecx, dword [esp + 0x4dc]
pop edi
xor al, al
mov dword fs:[0], ecx
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret