Function at 0x522fe0
Capabilities:
Delete file
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x65b298
mov eax, dword fs:[0]
push eax
sub esp, 0x14
push ebx
push ebp
push esi
push edi
mov eax, dword [0x758898]
xor eax, esp
push eax
lea eax, [esp + 0x28]
mov dword fs:[0], eax
mov edi, ecx
mov eax, dword [edi + 0x18]
xor ebp, ebp
cmp eax, ebp
jne 0x523015
lea eax, [edi + 0x1c]
push 0x67c5b0
push eax
call fcn.0062385d
mov ebx, eax
add esp, 8
mov dword [esp + 0x20], ebx
cmp ebx, ebp
je 0x5231fa
lea ecx, [esp + 0x24]
call fcn.004024f0
mov dword [esp + 0x30], ebp
mov eax, dword [edi + 0xc]
xor esi, esi
cmp eax, ebp
mov dword [esp + 0x18], esi
jle 0x5231b8
nop
lea ecx, [esp + 0x14]
call fcn.004024f0
mov byte [esp + 0x30], 1
test ebp, ebp
jl 0x52320e
cmp esi, dword [edi + 0xc]
jge 0x52320e
mov eax, dword [edi + 8]
push 0
push 0
push 0
push 0
add eax, ebp
mov eax, dword [eax + 8]
push 0xffffffffffffffff
push eax
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov esi, eax
test esi, esi
jle 0x52317a
mov ecx, dword [esp + 0x14]
mov eax, dword [ecx - 8]
mov edx, 1
sub edx, dword [ecx - 4]
sub eax, esi
or eax, edx
jge 0x5230bc
push esi
lea ecx, [esp + 0x18]
call fcn.004020b0
mov ecx, dword [esp + 0x14]
cmp esi, dword [ecx - 8]
mov ebx, ecx
jg 0x523213
mov dword [ecx - 0xc], esi
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
mov byte [esi + eax], 0
cmp ecx, dword [edi + 0xc]
jge 0x52320e
mov eax, dword [edi + 8]
push 0
push 0
push esi
push ebx
add eax, ebp
mov eax, dword [eax + 8]
push 0xffffffffffffffff
push eax
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
je 0x52317a
lea ecx, [esp + 0x1c]
call fcn.004024f0
mov byte [esp + 0x30], 2
mov eax, dword [esp + 0x18]
cmp eax, dword [edi + 0xc]
jge 0x52320e
mov ecx, dword [edi + 8]
add ecx, ebp
cmp eax, dword [edi + 0xc]
jge 0x52320e
mov eax, dword [edi + 8]
mov edx, dword [ecx + 4]
push ebx
add eax, ebp
mov eax, dword [eax]
push edx
push eax
lea ecx, [esp + 0x28]
push str._ld__s_r_n_s_r_n
push ecx
call fcn.00402f60
mov edx, dword [esp + 0x30]
mov eax, edx
add esp, 0x14
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x523152
mov ecx, dword [esp + 0x20]
push ecx
sub eax, esi
push eax
push 1
push edx
call fcn.00623715
add esp, 0x10
mov byte [esp + 0x30], 1
lea ecx, [esp + 0x1c]
call fcn.00402560
mov byte [esp + 0x30], 0
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x52319f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov esi, dword [esp + 0x18]
inc esi
add ebp, 0xc
cmp esi, dword [edi + 0xc]
mov dword [esp + 0x18], esi
jl 0x523050
mov ebx, dword [esp + 0x20]
push ebx
call fcn.00623537
mov eax, dword [edi + 0x24]
add esp, 4
test eax, eax
jne 0x5231cb
lea eax, [edi + 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov dword [esp + 0x30], 0xffffffff
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x5231fa
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x28]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret
call fcn.005f4f65
push 0x80070057
call fcn.00401090
int3