Function at 0x4f5c80
Capabilities:
Create directory
Read file on windows
Set file attributes
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x569978
mov eax, dword fs:[0]
push eax
push ecx
mov eax, 0x1074
call fcn.00543120
mov eax, dword [0x5b3680]
xor eax, esp
mov dword [esp + 0x1070], eax
push ebx
push esi
push edi
mov eax, dword [0x5b3680]
xor eax, esp
push eax
lea eax, [esp + 0x1088]
mov dword fs:[0], eax
mov ebx, ecx
lea ecx, [esp + 0x1c]
call fcn.00446740
mov dword [esp + 0x1090], 0
lea ecx, [esp + 0x10]
push 0x581d3c
call fcn.00434690
mov byte [esp + 0x1090], 1
xor eax, eax
or edi, 0xffffffff
mov word [esp + 0x28], ax
cmp dword [ebx + 0xc], eax
jne 0x4f6435
lea esi, [ebx + 0x3c]
jmp 0x4f5d10
mov dword [esp + 0x54], esi
push esi
mov byte [esp + 0x5c], 0
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov byte [esp + 0x58], 1
mov byte [esp + 0x1090], 2
cmp dword [ebx + 0x5c], 0
jne 0x4f5d54
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push 0x14
mov byte [esp + 0x5c], 0
call dword [sym.imp.KERNEL32.dll_Sleep]
mov byte [esp + 0x1090], 1
jmp 0x4f642b
lea eax, [esp + 0x4c]
push eax
lea ecx, [ebx + 0x54]
call fcn.004f6810
mov ecx, eax
mov dword [esp + 0x18], ecx
mov byte [esp + 0x1090], 3
mov edx, dword [ecx]
mov esi, dword [esp + 0x1c]
add esi, 0xfffffff0
lea edi, [edx - 0x10]
cmp edi, esi
je 0x4f5dc1
cmp dword [esi + 0xc], 0
jl 0x4f5db4
mov eax, dword [edi]
cmp eax, dword [esi]
jne 0x4f5db4
mov ecx, edi
call fcn.004022c0
mov edi, eax
lea edx, [esi + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4f5dab
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
lea eax, [edi + 0x10]
mov dword [esp + 0x1c], eax
jmp 0x4f5dc1
push dword [edx - 0xc]
lea ecx, [esp + 0x20]
push edx
call fcn.00402600
mov edx, dword [esp + 0x18]
mov esi, dword [esp + 0x20]
add esi, 0xfffffff0
mov edx, dword [edx + 4]
lea ecx, [edx - 0x10]
cmp ecx, esi
je 0x4f5e1c
cmp dword [esi + 0xc], 0
lea edi, [esi + 0xc]
jl 0x4f5e0f
mov eax, dword [ecx]
cmp eax, dword [esi]
jne 0x4f5e0f
call fcn.004022c0
mov dword [esp + 0x18], eax
or ecx, 0xffffffff
lock xadd dword [edi], ecx
dec ecx
test ecx, ecx
jg 0x4f5e06
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [esp + 0x18]
add eax, 0x10
mov dword [esp + 0x20], eax
jmp 0x4f5e1c
push dword [edx - 0xc]
lea ecx, [esp + 0x24]
push edx
call fcn.00402600
mov byte [esp + 0x1090], 4
lea eax, [esp + 0x50]
mov dword [esp + 0x30], eax
mov byte [esp + 0x1090], 4
or edi, 0xffffffff
mov edx, dword [esp + 0x50]
mov ecx, edi
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4f5e54
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [esp + 0x1090], 2
lea eax, [esp + 0x4c]
mov dword [esp + 0x30], eax
mov byte [esp + 0x1090], 2
mov ecx, edi
mov edx, dword [esp + 0x4c]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4f5e89
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [esp + 0x1090], 1
lea esi, [ebx + 0x3c]
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push 0x58d560
push dword [esp + 0x20]
mov byte [esp + 0x60], 0
call fcn.0052e5ea
add esp, 8
mov dword [ebx + 0x14], eax
test eax, eax
je 0x4f642b
push 2
push 0
push eax
call fcn.0052e84c
add esp, 0xc
push dword [ebx + 0x14]
call fcn.0052ec5f
mov ecx, dword [ebx + 0x30]
add esp, 4
shl ecx, 0x14
mov dword [esp + 0x48], eax
cmp eax, ecx
jae 0x4f6420
lea ecx, [esp + 0x68]
call fcn.00482350
mov byte [esp + 0x1090], 8
lea ecx, [esp + 0x10]
push eax
call fcn.00416320
mov byte [esp + 0x1090], 1
mov ecx, edi
mov edx, dword [esp + 0x68]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4f5f26
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
lea eax, [esp + 0x6c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemTime]
cmp dword [ebx + 4], 0
je 0x4f5f70
mov eax, dword [esp + 0x20]
lea ecx, [esp + 0x10]
push dword [eax - 0xc]
push eax
call fcn.00443ec0
push 1
push 0x58af04
lea ecx, [esp + 0x18]
call fcn.00443ec0
push 0
push dword [esp + 0x14]
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
push 2
push dword [esp + 0x14]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push 2
push 0x5894a4
lea ecx, [esp + 0x18]
call fcn.00443ec0
push 0
push dword [esp + 0x14]
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
push 2
push dword [esp + 0x14]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push 1
push 0x58af04
lea ecx, [esp + 0x18]
call fcn.00443ec0
push 4
push str.read
lea ecx, [esp + 0x18]
call fcn.00443ec0
push 0
push dword [esp + 0x14]
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
push 1
push 0x58af04
lea ecx, [esp + 0x18]
call fcn.00443ec0
xor eax, eax
mov dword [esp + 0x38], 0
lea ecx, [esp + 0x38]
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], eax
call fcn.004f4a10
lea eax, [esp + 0x5c]
push eax
lea ecx, [esp + 0x3c]
call fcn.00436c90
mov byte [esp + 0x1090], 0xa
push dword [eax]
lea eax, [esp + 0x14]
push str._s.0
push eax
call fcn.00443ea0
add esp, 0xc
mov byte [esp + 0x1090], 1
mov ecx, edi
mov edx, dword [esp + 0x5c]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4f6042
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [esp + 0x10]
cmp dword [eax - 0xc], 0xff
jl 0x4f6099
push 0xfe
lea eax, [esp + 0x64]
push eax
lea ecx, [esp + 0x18]
call fcn.00414320
mov byte [esp + 0x1090], 0xc
lea ecx, [esp + 0x10]
push eax
call fcn.00416320
mov byte [esp + 0x1090], 1
mov ecx, edi
mov edx, dword [esp + 0x60]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4f6099
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push 0x592f9c
push dword [esp + 0x14]
call fcn.0052e5ea
mov edi, eax
add esp, 8
mov dword [esp + 0x30], edi
test edi, edi
je 0x4f64f1
mov edx, dword [esp + 0x1c]
push edi
push 1
mov ecx, dword [edx - 0xc]
add ecx, ecx
push ecx
push edx
call fcn.0052b6e4
push edi
push 1
lea eax, [esp + 0x40]
push 2
push eax
call fcn.0052b6e4
push edi
push 1
lea eax, [esp + 0x94]
push 0x10
push eax
call fcn.0052b6e4
push 0
push 0
push dword [ebx + 0x14]
call fcn.0052e7bd
add esp, 0x3c
push 0x1000
push dword [esp + 0x4c]
call fcn.005308f4
mov esi, eax
add esp, 8
mov eax, edx
mov dword [esp + 0x2c], eax
test esi, esi
jle 0x4f6156
jmp 0x4f6120
push dword [ebx + 0x14]
lea eax, [esp + 0x80]
push 0x1000
push 1
push eax
call fcn.0052d4e2
push edi
push 0x1000
lea eax, [esp + 0x94]
push 1
push eax
call fcn.0052b6e4
add esp, 0x20
dec esi
jne 0x4f6120
mov eax, dword [esp + 0x2c]
push dword [ebx + 0x14]
push eax
lea eax, [esp + 0x84]
push 1
push eax
call fcn.0052d4e2
push edi
push dword [esp + 0x40]
lea eax, [esp + 0x94]
push 1
push eax
call fcn.0052b6e4
add esp, 0x20
lea ecx, [esp + 0x14]
call fcn.00482350
mov byte [esp + 0x1090], 0xe
cmp dword [ebx + 4], 0
je 0x4f61d0
mov eax, dword [esp + 0x20]
lea ecx, [esp + 0x14]
push dword [eax - 0xc]
push eax
call fcn.00443ec0
push 0
push dword [esp + 0x18]
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
push 2
push dword [esp + 0x18]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push 1
push 0x58af04
lea ecx, [esp + 0x1c]
call fcn.00443ec0
push 2
push 0x58949c
lea ecx, [esp + 0x1c]
call fcn.00443ec0
push 1
push 0x58af04
lea ecx, [esp + 0x1c]
call fcn.00443ec0
push 0
push dword [esp + 0x18]
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
push 2
push dword [esp + 0x18]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push 1
push 0x58af04
lea ecx, [esp + 0x1c]
call fcn.00443ec0
call fcn.00402a00
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
je 0x4f64f9
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [esp + 0x34], eax
mov byte [esp + 0x1090], 0x10
mov edx, 0x589480
push 0
push 1
lea ecx, [esp + 0x3c]
call fcn.004820b0
mov esi, dword [esp + 0x3c]
lea ecx, [esp + 0x1c]
add esp, 8
push dword [esi - 0xc]
push esi
call fcn.00443ec0
push 0x58d874
push dword [esp + 0x18]
mov byte [esp + 0x2f], 0
call fcn.0052e5ea
add esp, 8
mov dword [esp + 0x2c], eax
test eax, eax
je 0x4f63c2
push eax
push 1
lea eax, [esp + 0x74]
push 0x10
push eax
call fcn.0052b6e4
mov edi, dword [esp + 0x3c]
lea eax, [esp + 0x37]
push edi
push 1
push 1
push eax
call fcn.0052b6e4
push edi
push 1
lea eax, [esp + 0x70]
push 4
push eax
call fcn.0052b6e4
mov eax, dword [esp + 0x40]
add esp, 0x30
cmp dword [eax - 4], 1
jle 0x4f62d8
push dword [eax - 0xc]
lea ecx, [esp + 0x14]
call fcn.004024c0
mov eax, dword [esp + 0x10]
mov ecx, dword [eax - 0xc]
xor edx, edx
mov dword [esp + 0x18], eax
lea edi, [ecx + ecx]
or ecx, 0xffffffff
test edi, edi
je 0x4f6310
mov esi, eax
lea ecx, [ecx]
cmp ecx, 4
jl 0x4f62f9
xor ecx, ecx
jmp 0x4f62fa
inc ecx
mov al, byte [ecx + 0x5898b8]
xor byte [edx + esi], al
inc edx
cmp edx, edi
jb 0x4f62f0
mov esi, dword [esp + 0x34]
mov eax, dword [esp + 0x10]
mov eax, dword [eax - 0xc]
mov edi, dword [esp + 0x2c]
add eax, eax
push edi
push 1
push eax
push dword [esp + 0x24]
call fcn.0052b6e4
push edi
push 1
lea eax, [esp + 0x40]
push 2
push eax
call fcn.0052b6e4
mov edi, dword [esp + 0x3c]
add esp, 0x20
cmp dword [edi - 4], 1
jle 0x4f6352
push dword [edi - 0xc]
lea ecx, [esp + 0x20]
call fcn.004024c0
mov edi, dword [esp + 0x1c]
mov eax, dword [edi - 0xc]
or ecx, 0xffffffff
add eax, eax
mov dword [esp + 0x18], edi
xor edx, edx
mov dword [esp + 0x64], eax
test eax, eax
je 0x4f6390
mov esi, dword [esp + 0x18]
mov edi, eax
mov edi, edi
cmp ecx, 4
jl 0x4f6379
xor ecx, ecx
jmp 0x4f637a
inc ecx
mov al, byte [ecx + 0x5898b8]
xor byte [edx + esi], al
inc edx
cmp edx, edi
jb 0x4f6370
mov esi, dword [esp + 0x34]
mov edi, dword [esp + 0x1c]
mov eax, dword [edi - 0xc]
mov edi, dword [esp + 0x2c]
add eax, eax
push edi
push 1
push eax
push dword [esp + 0x24]
call fcn.0052b6e4
push edi
push 1
lea eax, [esp + 0x40]
push 2
push eax
call fcn.0052b6e4
push edi
call fcn.0052c324
mov edi, dword [esp + 0x54]
add esp, 0x24
push edi
call fcn.0052c17b
add esp, 4
push edi
call fcn.0052c324
add esp, 4
mov byte [esp + 0x1090], 0xe
add esi, 0xfffffff0
or edi, 0xffffffff
mov ecx, edi
lea eax, [esi + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4f63f8
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [esp + 0x1090], 1
mov ecx, edi
mov edx, dword [esp + 0x14]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4f641d
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
lea esi, [ebx + 0x3c]
push dword [ebx + 0x14]
call fcn.0052c324
add esp, 4
cmp dword [ebx + 0xc], 0
je 0x4f5d10
mov byte [esp + 0x1090], 0
mov ecx, edi
mov edx, dword [esp + 0x10]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4f645a
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [esp + 0x1090], 0x14
lea eax, [esp + 0x20]
mov dword [esp + 0x30], eax
mov byte [esp + 0x1090], 0x14
mov ecx, edi
mov edx, dword [esp + 0x20]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4f6492
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [esp + 0x1090], 0xffffffff
lea eax, [esp + 0x1c]
mov dword [esp + 0x30], eax
mov dword [esp + 0x1090], 0xffffffff
mov edx, dword [esp + 0x1c]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], edi
dec edi
test edi, edi
jg 0x4f64cb
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
xor eax, eax
mov ecx, dword [esp + 0x1088]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x1070]
xor ecx, esp
call fcn.005295e2
mov esp, ebp
pop ebp
ret
or edi, 0xffffffff
jmp 0x4f6420
push 0x80004005
call fcn.004027b0
int3