Function at 0x417900
Capabilities:
Encode data using xor
Get file size
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x43bce8
mov eax, dword fs:[0]
push eax
sub esp, 0x260
mov eax, dword [0x4c3740]
xor eax, esp
mov dword [esp + 0x258], eax
push ebx
push esi
push edi
mov eax, dword [0x4c3740]
xor eax, esp
push eax
lea eax, [esp + 0x270]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov esi, ecx
mov dword [esp + 0x28], esi
add esi, 8
mov dword [esp + 0x24], eax
mov eax, esi
mov byte [esp + 0x17], 0
lea edx, [eax + 1]
lea ebx, [ebx]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x417960
sub eax, edx
jne 0x4179fe
mov esi, dword [sym.imp.KERNEL32.dll_CreateFileA]
xor ebx, ebx
push ebx
push 0x80
push 3
push ebx
push 1
push 0xc0000000
push str.LogInfo.log
call esi
mov edi, eax
cmp edi, 0xffffffff
jne 0x4179f4
push ebx
push 0x80
push 4
push ebx
push 1
push 0xc0000000
push str.LogInfo.log
call esi
mov edi, eax
cmp edi, 0xffffffff
jne 0x417a81
push 0x1ff
lea ecx, [esp + 0x69]
push ebx
push ecx
mov byte [esp + 0x70], bl
call sub.MSVCR80.dll_memset
add esp, 0xc
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.WriteLog_faild__FileName:LogInfo.log_ErrorCode:_d
mov ecx, 0x200
lea edi, [esp + 0x6c]
call fcn.0040e120
add esp, 8
xor al, al
jmp 0x417bba
mov byte [esp + 0x17], 1
jmp 0x417a81
mov ebx, dword [sym.imp.KERNEL32.dll_CreateFileA]
push 0
push 0x80
push 3
push 0
push 1
push 0xc0000000
push esi
call ebx
mov edi, eax
cmp edi, 0xffffffff
jne 0x417a7a
push 0
push 0x80
push 4
push 0
push 1
push 0xc0000000
push esi
call ebx
mov edi, eax
cmp edi, 0xffffffff
jne 0x417a7f
push 0x1ff
lea edx, [esp + 0x69]
push 0
push edx
mov byte [esp + 0x70], 0
call sub.MSVCR80.dll_memset
add esp, 0xc
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
push str.WriteLog_faild__FileName:_s_ErrorCode:_d
mov ecx, 0x200
lea edi, [esp + 0x70]
call fcn.0040e120
add esp, 0xc
xor al, al
jmp 0x417bba
mov byte [esp + 0x17], 1
xor ebx, ebx
lea ecx, [esp + 0x2c]
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_void_]
lea eax, [esp + 0x1c]
push eax
mov dword [esp + 0x27c], ebx
push edi
mov dword [esp + 0x24], ebx
mov dword [esp + 0x28], ebx
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x417ac6
lea ecx, [esp + 0x2c]
mov dword [esp + 0x278], 0xffffffff
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
xor al, al
jmp 0x417bba
cmp byte [esp + 0x17], 0
je 0x417ae9
mov ecx, dword [esp + 0x1c]
or ecx, dword [esp + 0x20]
je 0x417ae9
push 2
push ebx
xor ecx, ecx
push ecx
xor eax, eax
push eax
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
jmp 0x417b21
lea ecx, [esp + 0x48]
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_void_]
lea esi, [esp + 0x48]
mov byte [esp + 0x278], 1
call fcn.00417d00
mov edx, esi
push edx
lea ecx, [esp + 0x30]
call dword [0x43e210]
mov ecx, esi
mov byte [esp + 0x278], 0
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
mov eax, dword [esp + 0x24]
push eax
lea ecx, [esp + 0x30]
call dword [0x43e254]
push 0x4b3688
lea ecx, [esp + 0x30]
call dword [0x43e254]
mov ecx, dword [esp + 0x28]
cmp byte [ecx + 6], 0
mov edx, 0x10
je 0x417b6f
cmp dword [esp + 0x44], edx
mov eax, dword [esp + 0x30]
jae 0x417b5c
lea eax, [esp + 0x30]
mov ecx, dword [esp + 0x40]
cmp ecx, ebx
jbe 0x417b6f
xor byte [eax], 0xca
add eax, 1
sub ecx, 1
jne 0x417b64
cmp dword [esp + 0x44], edx
mov eax, dword [esp + 0x30]
mov dword [esp + 0x18], ebx
jae 0x417b81
lea eax, [esp + 0x30]
mov ecx, dword [esp + 0x40]
push ebx
lea edx, [esp + 0x1c]
push edx
push ecx
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x417aaa
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [esp + 0x2c]
mov dword [esp + 0x278], 0xffffffff
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
mov al, 1
mov ecx, dword [esp + 0x270]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x258]
xor ecx, esp
call fcn.00437634
mov esp, ebp
pop ebp
ret 4