Function at 0x4158a0
Capabilities:
Delete file
Encode data using xor
Set file attributes
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x55de47
mov eax, dword fs:[0]
push eax
sub esp, 0xf4
mov eax, dword [0x5b5be8]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov edi, dword [ebp + 0xc]
mov dword [ebp - 0xfc], eax
xor eax, eax
mov esi, edx
mov dword [ebp - 0xf8], ecx
mov dword [ebp - 0x8c], eax
mov byte [ebp - 0x9c], al
push 0x5b7610
or eax, 0xffffffff
xor ebx, ebx
lea ecx, [ebp - 0x9c]
mov dword [ebp - 0x100], esi
mov dword [ebp - 0x88], 0xf
call fcn.00409a30
push 9
mov eax, str.Resource_
lea ecx, [ebp - 0x9c]
mov dword [ebp - 4], ebx
call fcn.0040a0b0
lea edx, [ebp - 0x9c]
push edx
or eax, 0xffffffff
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x18], 0xf
mov dword [ebp - 0x1c], ebx
mov byte [ebp - 0x2c], bl
call fcn.00409a30
mov eax, esi
mov byte [ebp - 4], 1
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x415952
sub eax, ecx
push eax
mov eax, esi
lea ecx, [ebp - 0x2c]
call fcn.0040a0b0
xor eax, eax
mov byte [ebp - 0xf1], al
mov dword [ebp - 0x34], 0xf
mov dword [ebp - 0x38], eax
mov byte [ebp - 0x48], al
push edi
lea ebx, [ebp - 0x48]
mov byte [ebp - 4], 2
call fcn.00427610
mov esi, dword [ebp - 0x48]
mov ebx, 0x10
add esp, 4
cmp dword [ebp - 0x34], ebx
jae 0x41599b
lea esi, [ebp - 0x48]
push 0x58e038
push esi
call fcn.005329bc
add esp, 8
test eax, eax
je 0x4159d1
push 0x58e03c
push esi
call fcn.005329bc
add esp, 8
test eax, eax
je 0x4159d1
push 0x58e040
push esi
call fcn.005329bc
add esp, 8
test eax, eax
jne 0x4159d8
mov byte [ebp - 0xf1], 1
mov esi, dword [ebp - 0x48]
cmp dword [ebp - 0x34], ebx
jae 0x4159e3
lea esi, [ebp - 0x48]
call fcn.00414070
mov ebx, dword [ebp - 0xf8]
test al, al
jne 0x415a16
xor eax, eax
cmp dword [ebp + 0x10], eax
jbe 0x415a16
mov edx, dword [ebp + 0x10]
lea esp, [esp]
mov ecx, eax
and ecx, 0xff
mov cl, byte [ecx + 0x591b08]
xor byte [ebx + eax], cl
inc eax
cmp eax, edx
jb 0x415a00
cmp byte [ebp - 0xf1], 0
je 0x415b6f
mov eax, dword [ebp - 0x2c]
xor esi, esi
mov edi, 0x10
mov dword [ebp - 0xf8], esi
cmp dword [ebp - 0x18], edi
jae 0x415a3b
lea eax, [ebp - 0x2c]
push 0x58e088
push eax
lea edx, [ebp - 0xf8]
push edx
call fcn.00534419
mov eax, dword [ebp - 0xf8]
mov ecx, dword [ebp + 0x10]
push eax
push 1
push ecx
push ebx
call fcn.00534d51
mov edx, dword [ebp - 0xf8]
add esp, 0x1c
push edx
cmp eax, 1
je 0x415b14
call fcn.005347c7
mov eax, dword [ebp - 0x2c]
add esp, 4
cmp dword [ebp - 0x18], edi
jae 0x415a86
lea eax, [ebp - 0x2c]
push eax
mov eax, dword [ebp - 0xfc]
mov ecx, dword [eax + 0x20]
push 0x1d
push ecx
call fcn.00414260
mov esi, dword [ebp - 0x2c]
add esp, 0xc
cmp dword [ebp - 0x18], edi
jae 0x415aa6
lea esi, [ebp - 0x2c]
push 0x80
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
cmp dword [ebp - 0x34], edi
jb 0x415aca
mov edx, dword [ebp - 0x48]
push edx
call fcn.004310e1
add esp, 4
xor esi, esi
mov ebx, 0xf
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x38], esi
mov byte [ebp - 0x48], 0
cmp dword [ebp - 0x18], edi
jb 0x415aec
mov eax, dword [ebp - 0x2c]
push eax
call fcn.004310e1
add esp, 4
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x1c], esi
mov byte [ebp - 0x2c], 0
cmp dword [ebp - 0x88], edi
jb 0x415b0d
mov ecx, dword [ebp - 0x9c]
push ecx
call fcn.004310e1
add esp, 4
xor al, al
jmp 0x415f69
call fcn.005347c7
add esp, 4
cmp dword [ebp - 0x34], edi
jb 0x415b2d
mov eax, dword [ebp - 0x48]
push eax
call fcn.004310e1
add esp, 4
mov ebx, 0xf
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x38], esi
mov byte [ebp - 0x48], 0
cmp dword [ebp - 0x18], edi
jb 0x415b4d
mov ecx, dword [ebp - 0x2c]
push ecx
call fcn.004310e1
add esp, 4
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x1c], esi
mov byte [ebp - 0x2c], 0
cmp dword [ebp - 0x88], edi
jb 0x415f67
mov edx, dword [ebp - 0x9c]
push edx
jmp 0x415f5f
mov ecx, dword [0x5be5dc]
mov eax, dword [ecx]
mov esi, dword [ebp - 0x100]
mov edx, dword [eax + 0x10]
push esi
call edx
test al, al
je 0x415b95
mov ecx, dword [0x5be5dc]
mov eax, dword [ecx]
mov edx, dword [eax + 0x28]
push esi
call edx
mov eax, dword [ebp - 0xfc]
cmp byte [eax + 0x24], 1
jne 0x415e34
mov dword [ebp - 0x6c], 0xf
mov dword [ebp - 0x70], 0
mov byte [ebp - 0x80], 0
push edi
lea ecx, [ebp - 0x80]
mov byte [ebp - 4], 3
call fcn.004274b0
mov eax, dword [ebp - 0x70]
add esp, 4
test eax, eax
je 0x415c33
dec eax
test eax, eax
jle 0x415c33
mov edx, dword [ebp - 0x6c]
mov esi, dword [ebp - 0x80]
lea esp, [esp]
mov ecx, esi
cmp edx, 0x10
jae 0x415bea
lea ecx, [ebp - 0x80]
cmp byte [ecx + eax], 0x2e
je 0x415bf7
dec eax
test eax, eax
jg 0x415be0
jmp 0x415c33
push eax
lea ecx, [ebp - 0x80]
push ecx
xor ebx, ebx
lea esi, [ebp - 0xb8]
call fcn.00411b30
mov edi, eax
lea esi, [ebp - 0x80]
mov byte [ebp - 4], 4
call fcn.00409930
mov byte [ebp - 4], 3
cmp dword [ebp - 0xa4], 0x10
jb 0x415c33
mov edx, dword [ebp - 0xb8]
push edx
call fcn.004310e1
add esp, 4
push str._shift_jis_.
lea eax, [ebp - 0x80]
push eax
lea ecx, [ebp - 0xd4]
push ecx
call fcn.0040b1b0
add esp, 0xc
mov ecx, eax
lea eax, [ebp - 0x48]
lea ebx, [ebp - 0x64]
mov byte [ebp - 4], 5
call fcn.00412cc0
mov edi, 0x10
mov byte [ebp - 4], 7
cmp dword [ebp - 0xc0], edi
jb 0x415c7c
mov edx, dword [ebp - 0xd4]
push edx
call fcn.004310e1
add esp, 4
xor eax, eax
lea ecx, [ebp - 0x64]
mov dword [ebp - 0xc0], 0xf
mov dword [ebp - 0xc4], eax
mov byte [ebp - 0xd4], al
call fcn.00419610
mov eax, dword [ebp - 0x64]
cmp dword [ebp - 0x50], edi
jae 0x415ca7
lea eax, [ebp - 0x64]
mov ecx, dword [0x5be5dc]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 0x10]
call eax
test al, al
je 0x415cd2
mov eax, dword [ebp - 0x64]
cmp dword [ebp - 0x50], edi
jae 0x415cc4
lea eax, [ebp - 0x64]
mov ecx, dword [0x5be5dc]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 0x28]
call eax
push str._ascii_.
lea ecx, [ebp - 0x80]
push ecx
lea edx, [ebp - 0xf0]
push edx
call fcn.0040b1b0
add esp, 0xc
mov ecx, eax
lea eax, [ebp - 0x48]
lea ebx, [ebp - 0xb8]
mov byte [ebp - 4], 8
call fcn.00412cc0
mov esi, eax
lea eax, [ebp - 0x64]
cmp eax, esi
je 0x415d61
cmp dword [ebp - 0x50], edi
jb 0x415d18
mov ecx, dword [ebp - 0x64]
push ecx
call fcn.004310e1
add esp, 4
xor ebx, ebx
mov dword [ebp - 0x50], 0xf
mov dword [ebp - 0x54], ebx
mov byte [ebp - 0x64], bl
cmp dword [esi + 0x14], edi
jae 0x415d40
mov eax, dword [esi + 0x10]
inc eax
push eax
lea edx, [ebp - 0x64]
push esi
push edx
call fcn.00532370
add esp, 0xc
jmp 0x415d47
mov eax, dword [esi]
mov dword [ebp - 0x64], eax
mov dword [esi], ebx
mov ecx, dword [esi + 0x10]
mov dword [ebp - 0x54], ecx
mov edx, dword [esi + 0x14]
mov dword [ebp - 0x50], edx
mov dword [esi + 0x14], 0xf
mov dword [esi + 0x10], ebx
mov byte [esi], bl
jmp 0x415d63
xor ebx, ebx
cmp dword [ebp - 0xa4], edi
jb 0x415d7a
mov eax, dword [ebp - 0xb8]
push eax
call fcn.004310e1
add esp, 4
mov byte [ebp - 4], 7
mov dword [ebp - 0xa4], 0xf
mov dword [ebp - 0xa8], ebx
mov byte [ebp - 0xb8], bl
cmp dword [ebp - 0xdc], edi
jb 0x415dab
mov ecx, dword [ebp - 0xf0]
push ecx
call fcn.004310e1
add esp, 4
lea ecx, [ebp - 0x64]
call fcn.00419610
mov eax, dword [ebp - 0x64]
cmp dword [ebp - 0x50], edi
jae 0x415dbe
lea eax, [ebp - 0x64]
mov ecx, dword [0x5be5dc]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 0x10]
call eax
test al, al
je 0x415de9
mov eax, dword [ebp - 0x64]
cmp dword [ebp - 0x50], edi
jae 0x415ddb
lea eax, [ebp - 0x64]
mov ecx, dword [0x5be5dc]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 0x28]
call eax
cmp dword [ebp - 0x50], edi
jb 0x415dfa
mov ecx, dword [ebp - 0x64]
push ecx
call fcn.004310e1
add esp, 4
mov esi, 0xf
mov byte [ebp - 4], 2
mov dword [ebp - 0x50], esi
mov dword [ebp - 0x54], ebx
mov byte [ebp - 0x64], bl
cmp dword [ebp - 0x6c], edi
jb 0x415e1d
mov edx, dword [ebp - 0x80]
push edx
call fcn.004310e1
add esp, 4
mov edi, dword [ebp - 0x100]
mov dword [ebp - 0x70], ebx
mov byte [ebp - 0x80], bl
mov ebx, dword [ebp - 0xf8]
mov dword [ebp - 0x6c], esi
jmp 0x415e36
mov edi, esi
mov ecx, dword [0x5be5dc]
mov eax, dword [ecx]
mov edx, dword [eax]
push 7
push edi
call edx
mov esi, eax
test esi, esi
jne 0x415ec8
mov eax, dword [ebp - 0xfc]
mov eax, dword [eax + 0x20]
push edi
push str.cannot_create_packing_file.__s
push 3
call fcn.00401690
add esp, 0xc
mov esi, 0x10
cmp dword [ebp - 0x34], esi
jb 0x415e7a
mov ecx, dword [ebp - 0x48]
push ecx
call fcn.004310e1
add esp, 4
xor edi, edi
mov ebx, 0xf
mov byte [ebp - 0x48], 0
mov dword [ebp - 0x38], edi
mov dword [ebp - 0x34], ebx
cmp dword [ebp - 0x18], esi
jb 0x415e9c
mov edx, dword [ebp - 0x2c]
push edx
call fcn.004310e1
add esp, 4
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x1c], edi
mov byte [ebp - 0x2c], 0
cmp dword [ebp - 0x88], esi
jb 0x415b0d
mov eax, dword [ebp - 0x9c]
push eax
call fcn.004310e1
add esp, 4
xor al, al
jmp 0x415f69
mov ecx, dword [ebp + 0x10]
mov edx, dword [0x5be5dc]
push ebx
push esi
call fcn.0041c7e0
test al, al
jne 0x415f04
mov ecx, dword [ebp - 0xfc]
mov eax, dword [ecx + 0x20]
push edi
push str.cannot_write_packing_file.__s
push 3
call fcn.00401690
mov edx, dword [esi]
mov eax, dword [edx]
add esp, 0xc
push 1
mov ecx, esi
call eax
jmp 0x415e64
mov edx, dword [esi]
mov eax, dword [edx]
push 1
mov ecx, esi
call eax
mov esi, 0x10
cmp dword [ebp - 0x34], esi
jb 0x415f24
mov ecx, dword [ebp - 0x48]
push ecx
call fcn.004310e1
add esp, 4
xor edi, edi
mov ebx, 0xf
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x38], edi
mov byte [ebp - 0x48], 0
cmp dword [ebp - 0x18], esi
jb 0x415f46
mov edx, dword [ebp - 0x2c]
push edx
call fcn.004310e1
add esp, 4
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x1c], edi
mov byte [ebp - 0x2c], 0
cmp dword [ebp - 0x88], esi
jb 0x415f67
mov eax, dword [ebp - 0x9c]
push eax
call fcn.004310e1
add esp, 4
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.005320a3
mov esp, ebp
pop ebp
ret 0xc