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

Disassembly:
push 0xffffffffffffffff
push 0x65a8f8
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 0x522bc5
lea eax, [edi + 0x1c]
push 0x67c5b0
push eax
call fcn.00622e3d
mov ebx, eax
add esp, 8
mov dword [esp + 0x20], ebx
cmp ebx, ebp
je 0x522daa
lea ecx, [esp + 0x24]
call fcn.00402500
mov dword [esp + 0x30], ebp
mov eax, dword [edi + 0xc]
xor esi, esi
cmp eax, ebp
mov dword [esp + 0x18], esi
jle 0x522d68
nop
lea ecx, [esp + 0x14]
call fcn.00402500
mov byte [esp + 0x30], 1
test ebp, ebp
jl 0x522dbe
cmp esi, dword [edi + 0xc]
jge 0x522dbe
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 0x522d2a
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 0x522c6c
push esi
lea ecx, [esp + 0x18]
call fcn.004020c0
mov ecx, dword [esp + 0x14]
cmp esi, dword [ecx - 8]
mov ebx, ecx
jg 0x522dc3
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 0x522dbe
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 0x522d2a
lea ecx, [esp + 0x1c]
call fcn.00402500
mov byte [esp + 0x30], 2
mov eax, dword [esp + 0x18]
cmp eax, dword [edi + 0xc]
jge 0x522dbe
mov ecx, dword [edi + 8]
add ecx, ebp
cmp eax, dword [edi + 0xc]
jge 0x522dbe
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.00402f70
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 0x522d02
mov ecx, dword [esp + 0x20]
push ecx
sub eax, esi
push eax
push 1
push edx
call fcn.00622cf5
add esp, 0x10
mov byte [esp + 0x30], 1
lea ecx, [esp + 0x1c]
call fcn.00402570
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 0x522d4f
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 0x522c00
mov ebx, dword [esp + 0x20]
push ebx
call fcn.00622b17
mov eax, dword [edi + 0x24]
add esp, 4
test eax, eax
jne 0x522d7b
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 0x522daa
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.005f4545
push 0x80070057
call fcn.00401090
int3