Function at 0x10039590
Capabilities:
Delete file
Enumerate files on windows
Move file
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100bb18b
mov eax, dword fs:[0]
push eax
mov eax, 0x184c
call fcn.10071fa0
mov eax, dword [0x100f51d4]
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 ebx, ecx
mov dword [ebp - 0x1854], ebx
mov edi, dword [ebp + 8]
lea eax, [ebp - 0x216]
push 0x206
push 0
push eax
mov dword [ebp - 0x184c], edi
call fcn.10097030
add esp, 0xc
lea eax, [ebp - 0x420]
push 0x208
push 0
push eax
call fcn.10097030
or esi, 0xffffffff
mov dword [ebp - 0x1858], 0
add esp, 0xc
mov dword [ebp - 0x1850], esi
test edi, edi
jne 0x10039620
mov eax, 1
jmp 0x10039c5a
xor eax, eax
cmp ax, word [edi]
je 0x10039616
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov eax, dword [ebx + 0xc54]
inc eax
cdq
xor eax, edx
sub eax, edx
mov dword [ebx + 0xc54], eax
xor eax, eax
push str..log2
mov word [ebp - 0x218], ax
lea eax, [ebx + 0x428]
push str.New360_formal_
push eax
push str._s_s_s
lea eax, [ebp - 0x830]
push 0x104
push eax
call fcn.10021620
add esp, 0x18
lea eax, [ebp - 0xa80]
push eax
lea eax, [ebp - 0x830]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov edi, eax
mov dword [ebp - 0x1848], edi
cmp edi, 0xffffffff
je 0x100397d8
jmp 0x100396a0
test byte [ebp - 0xa80], 0x10
jne 0x10039765
lea eax, [ebp - 0xa54]
push eax
lea eax, [ebx + 0x428]
push eax
push 0x100e37fc
lea eax, [ebp - 0x628]
push 0x104
push eax
call fcn.10021620
mov eax, dword [ebp - 0xa64]
xor ecx, ecx
add esp, 0x14
add ecx, dword [ebp - 0xa60]
adc eax, 0
test eax, eax
jg 0x10039765
jl 0x100396f3
cmp ecx, 0x200000
ja 0x10039765
push 0
push 0
push 4
push 0
push 3
push 0x12019f
lea eax, [ebp - 0x628]
or esi, 0xffffffff
push eax
mov dword [ebp - 0x1850], esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, esi
je 0x1003975f
xor eax, eax
mov dword [ebp - 0x1844], eax
mov dword [ebp - 0x1840], eax
mov dword [ebp - 0x183c], eax
mov dword [ebp - 0x1838], eax
mov dword [ebp - 0x1834], eax
lea eax, [ebp - 0x1844]
push eax
push 0
push 1
push 0
push 3
push edi
call dword [sym.imp.KERNEL32.dll_LockFileEx]
test eax, eax
jne 0x1003977d
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [ebp - 0x1848]
lea eax, [ebp - 0xa80]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x100396a0
jmp 0x100397cc
mov esi, edi
lea ecx, [ebp - 0x218]
lea edi, [ebp - 0x628]
mov dword [ebp - 0x1850], esi
mov eax, ecx
mov edx, 0x104
sub edi, eax
lea ebx, [ebx]
lea eax, [edx + 0x7ffffefa]
test eax, eax
je 0x100397c0
movzx eax, word [edi + ecx]
test ax, ax
je 0x100397c0
mov word [ecx], ax
add ecx, 2
sub edx, 1
jne 0x100397a0
jmp 0x100397c4
test edx, edx
jne 0x100397c7
sub ecx, 2
xor eax, eax
mov word [ecx], ax
push dword [ebp - 0x1848]
call dword [sym.imp.KERNEL32.dll_FindClose]
xor eax, eax
cmp ax, word [ebp - 0x218]
jne 0x1003984f
lea eax, [ebp - 0x218]
mov ecx, ebx
push eax
call fcn.10039c80
test eax, eax
je 0x10039c54
lea eax, [ebp - 0x1850]
push eax
lea ecx, [ebp - 0x218]
call fcn.10039db0
test eax, eax
jne 0x10039849
mov eax, dword [ebx + 0xc54]
mov ecx, ebx
inc eax
cdq
xor eax, edx
sub eax, edx
mov dword [ebx + 0xc54], eax
lea eax, [ebp - 0x218]
push eax
call fcn.10039c80
lea eax, [ebp - 0x1850]
push eax
lea ecx, [ebp - 0x218]
call fcn.10039db0
test eax, eax
je 0x10039c54
mov esi, dword [ebp - 0x1850]
mov edi, dword [ebp - 0x184c]
lea eax, [ebp - 0x420]
push str..mg2
push edi
push 0x100e5b10
push 0x104
push eax
call fcn.10021620
add esp, 0x14
lea eax, [ebp - 0x420]
push 1
push eax
push edi
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
je 0x10039c14
lea eax, [ebp - 0xa80]
push eax
push 0
lea eax, [ebp - 0x420]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesExW]
test eax, eax
je 0x10039c14
xor edi, edi
mov edi, dword [ebp - 0xa60]
cmp edi, 0x300000
jbe 0x10039a21
push 0x1000
lea eax, [ebp - 0x1830]
push 0
push eax
call fcn.10097030
add esp, 0xc
mov dword [ebp - 0x184c], 0
lea eax, [ebp - 0x420]
mov dword [ebp - 0x1848], 0
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push 0
push 0
push 4
push 0
push 3
push 0x12019f
lea eax, [ebp - 0x420]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x10039a0e
push 0
lea eax, [ebp - 0x1848]
push eax
mov eax, dword [ebp - 0x1854]
push 0xc8
add eax, 0xcb0
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x100399fe
cmp dword [ebp - 0x1848], 0xc8
jne 0x100399fe
lea eax, [ebp - 0x1840]
push eax
push 0
call fcn.1009cd43
add esp, 4
push edx
push eax
call fcn.100390c0
push edi
mov edi, dword [ebp - 0x1854]
push str.log_file_is_too_big_to_merge_
push dword [edi + 0xc50]
lea eax, [edi + 0xb40]
push eax
lea eax, [edi + 0xa40]
push eax
lea eax, [edi + 0x228]
push eax
lea eax, [edi + 0x28]
push eax
movzx eax, word [ebp - 0x1834]
push eax
movzx eax, word [ebp - 0x1836]
push eax
movzx eax, word [ebp - 0x1838]
push eax
movzx eax, word [ebp - 0x183a]
push eax
movzx eax, word [ebp - 0x183e]
push eax
movzx eax, word [ebp - 0x1840]
push eax
push str._t_4d__02d__02d__02d:_02d:_02d__p_s__c_s__m_s__m2_s__lan_d__warning_s__logfile_len_d_bytes__n
lea eax, [ebp - 0x1830]
push 0x800
push eax
call fcn.10021620
add esp, 0x40
lea eax, [ebp - 0x1830]
push eax
push ecx
mov ecx, edi
call fcn.10039e90
test eax, eax
je 0x100399fe
mov dword [ebp - 0x184c], 1
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x184c], 0
jne 0x10039a21
lea eax, [ebp - 0x420]
push eax
mov eax, dword [sym.imp.KERNEL32.dll_DeleteFileW]
call eax
jmp 0x10039c14
cmp esi, 0xffffffff
je 0x10039c0a
mov dword [ebp - 0x183c], 0
mov dword [ebp - 0x1838], 0
mov dword [ebp - 0x1834], 0
mov dword [ebp - 4], 0
lea eax, [ebp - 0x183c]
push eax
push 0x40000
mov ecx, eax
call fcn.100150c0
mov eax, dword [ebp - 0x1838]
mov edi, dword [ebp - 0x183c]
sub eax, edi
cmp eax, 0x40000
je 0x10039adf
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x183c]
test ecx, ecx
je 0x10039c0a
mov edx, dword [ebp - 0x1834]
mov eax, ecx
sub edx, ecx
cmp edx, 0x1000
jb 0x10039ab2
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10039c78
push edx
push ecx
call fcn.100716aa
add esp, 8
mov dword [ebp - 0x183c], 0
mov dword [ebp - 0x1838], 0
mov dword [ebp - 0x1834], 0
jmp 0x10039c0a
push 0
push 0
push 3
push 0
push 1
push 0x120089
lea eax, [ebp - 0x420]
mov dword [ebp - 0x1848], 0
push eax
mov dword [ebp - 0x184c], 0
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x10039a77
push 2
push 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea eax, [ebp - 0x1848]
push eax
push 0x40000
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x10039b89
mov eax, dword [ebp - 0x1848]
test eax, eax
je 0x10039b89
push 0
lea ecx, [ebp - 0x184c]
push ecx
push eax
push edi
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x10039b90
mov eax, dword [ebp - 0x184c]
cmp eax, dword [ebp - 0x1848]
jne 0x10039b90
push 0
lea eax, [ebp - 0x1848]
push eax
push 0x40000
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x10039b41
mov edi, 1
jmp 0x10039b92
xor edi, edi
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x183c]
test ecx, ecx
je 0x10039bf8
mov edx, dword [ebp - 0x1834]
mov eax, ecx
sub edx, ecx
cmp edx, 0x1000
jb 0x10039bd0
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10039c78
push edx
push ecx
call fcn.100716aa
add esp, 8
mov dword [ebp - 0x183c], 0
mov dword [ebp - 0x1838], 0
mov dword [ebp - 0x1834], 0
test edi, edi
je 0x10039c0a
lea eax, [ebp - 0x420]
push eax
mov eax, dword [sym.imp.KERNEL32.dll_DeleteFileW]
call eax
mov dword [ebp - 0x1858], 1
cmp esi, 0xffffffff
je 0x10039c54
xor eax, eax
mov dword [ebp - 0x1844], eax
mov dword [ebp - 0x1840], eax
mov dword [ebp - 0x183c], eax
mov dword [ebp - 0x1838], eax
mov dword [ebp - 0x1834], eax
lea eax, [ebp - 0x1844]
push eax
push 0
push 1
push 0
push esi
call dword [sym.imp.KERNEL32.dll_UnlockFileEx]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x1858]
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.10071699
mov esp, ebp
pop ebp
ret 4
call fcn.1009a1bd
int3