Function at 0x476f10
Capabilities:
Create directory
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5158c8
mov eax, dword fs:[0]
push eax
sub esp, 0x118
mov eax, dword [0x577680]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov dword [ebp - 4], 0
push 0x400
mov byte [ebp - 4], 2
call fcn.004ef820
add esp, 4
mov dword [ebp - 0xf4], eax
push 0x800
call fcn.004ef820
add esp, 4
mov dword [ebp - 0xfc], eax
push 0x4000
call fcn.004ef820
add esp, 4
lea ecx, [ebp - 0xa0]
mov dword [ebp - 0x100], eax
call fcn.004765d0
mov eax, dword [0x5771f0]
mov ecx, 0x5771f0
mov byte [ebp - 4], 3
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0xe8], esi
mov eax, dword [0x5771f0]
mov ecx, 0x5771f0
mov byte [ebp - 4], 4
call dword [eax + 0xc]
lea edi, [eax + 0x10]
mov dword [ebp - 0xe4], edi
mov eax, dword [0x5771f0]
mov ecx, 0x5771f0
mov byte [ebp - 4], 5
call dword [eax + 0xc]
lea ebx, [eax + 0x10]
mov dword [ebp - 0x11c], ebx
push dword [ebp + 0xc]
lea ecx, [ebp - 0xa0]
mov byte [ebp - 4], 6
call fcn.00476a60
push 0
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
lea eax, [ebp - 0x124]
push eax
lea ecx, [ebp - 0xa0]
call fcn.00476990
lea ecx, [ebp - 0xa0]
call fcn.004769b0
xor eax, eax
mov dword [ebp - 0x104], eax
cmp eax, dword [ebp - 0x124]
jge 0x4775c7
lea ecx, [ebp - 0xa0]
test eax, eax
jne 0x47703d
call fcn.004769b0
jmp 0x477042
call fcn.004769f0
lea ecx, [ebp - 0xa0]
call fcn.00476b70
push 0x400
push 0
push dword [ebp - 0xf4]
call fcn.004f2250
mov esi, dword [ebp - 0xfc]
push 0x800
push 0
push esi
call fcn.004f2250
add esp, 0x18
lea eax, [ebp - 0xdc]
push 0
push 0
push 0
push 0
push 0x400
push dword [ebp - 0xf4]
lea ecx, [ebp - 0xa0]
push eax
call fcn.00476930
push 0x400
push esi
push 0xffffffffffffffff
push dword [ebp - 0xf4]
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test esi, esi
jne 0x4770bd
xor ecx, ecx
jmp 0x4770d1
mov ecx, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4770c2
sub ecx, edx
sar ecx, 1
push ecx
push esi
lea ecx, [ebp - 0xe8]
call fcn.0040c730
mov eax, dword [ebp + 8]
lea esi, [edi - 0x10]
lea edx, [eax - 0x10]
cmp edx, esi
je 0x477143
cmp dword [esi + 0xc], 0
lea edi, [esi + 0xc]
jl 0x47712e
mov ecx, dword [edx]
cmp ecx, dword [esi]
jne 0x47712e
push edx
call fcn.004056f0
add esp, 4
mov dword [ebp - 0xe0], eax
or ecx, 0xffffffff
lock xadd dword [edi], ecx
dec ecx
test ecx, ecx
jg 0x477123
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0xe0]
lea edi, [eax + 0x10]
mov dword [ebp - 0xe4], edi
jmp 0x477143
push dword [eax - 0xc]
lea ecx, [ebp - 0xe4]
push eax
call fcn.0040c730
mov edi, dword [ebp - 0xe4]
mov esi, dword [ebp - 0xe8]
push 0x533664
push esi
call fcn.004f7689
add esp, 8
test eax, eax
jne 0x477160
or eax, 0xffffffff
jmp 0x477164
sub eax, esi
sar eax, 1
mov dword [ebp - 0xe0], eax
test eax, eax
js 0x47741a
inc eax
push eax
lea eax, [ebp - 0x114]
push eax
lea ecx, [ebp - 0xe8]
call fcn.00408550
push eax
lea eax, [ebp - 0xe4]
push eax
lea eax, [ebp - 0x110]
push eax
mov byte [ebp - 4], 7
call fcn.00402a80
add esp, 0xc
mov edx, dword [eax]
lea ecx, [edi - 0x10]
lea eax, [edx - 0x10]
mov byte [ebp - 4], 8
mov dword [ebp - 0xec], ecx
cmp eax, ecx
je 0x477290
cmp dword [ecx + 0xc], 0
lea eax, [ecx + 0xc]
mov dword [ebp - 0xf8], eax
jl 0x47727b
mov eax, dword [edx - 0x10]
lea edi, [edx - 0x10]
mov dword [ebp - 0xf0], eax
cmp eax, dword [ecx]
jne 0x47727b
mov eax, dword [eax]
mov ecx, dword [ebp - 0xf0]
call dword [eax + 0x10]
cmp dword [edi + 0xc], 0
lea edx, [edi + 0xc]
mov ecx, eax
jl 0x477207
cmp ecx, dword [edi]
jne 0x477207
mov eax, 1
lock xadd dword [edx], eax
jmp 0x477250
mov eax, dword [ecx]
push 2
push dword [edi + 4]
call dword [eax]
mov edx, eax
mov dword [ebp - 0xf0], edx
test edx, edx
jne 0x477221
call fcn.0040cb60
mov eax, dword [edi + 4]
mov dword [edx + 4], eax
mov ecx, dword [edi + 4]
lea eax, [ecx*2 + 2]
push eax
lea eax, [edi + 0x10]
push eax
lea eax, [ecx*2 + 2]
push eax
lea eax, [edx + 0x10]
push eax
call fcn.004f18c0
mov edi, dword [ebp - 0xf0]
add esp, 0x10
mov ecx, dword [ebp - 0xf8]
or eax, 0xffffffff
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x477270
mov edx, dword [ebp - 0xec]
push edx
mov ecx, dword [edx]
mov eax, dword [ecx]
call dword [eax + 4]
add edi, 0x10
mov dword [ebp - 0xe4], edi
jmp 0x477290
push dword [edx - 0xc]
lea ecx, [ebp - 0xe4]
push edx
call fcn.0040c730
mov edi, dword [ebp - 0xe4]
mov edx, dword [ebp - 0x110]
add edx, 0xfffffff0
mov byte [ebp - 4], 7
lea eax, [edx + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4772b4
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x114]
add edx, 0xfffffff0
mov byte [ebp - 4], 6
lea eax, [edx + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4772d8
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push 0
push edi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov eax, dword [esi - 0xc]
sub eax, dword [ebp - 0xe0]
lea ecx, [ebp - 0xe8]
dec eax
push eax
lea eax, [ebp - 0x108]
push eax
call fcn.00409910
mov edx, dword [eax]
lea ecx, [esi - 0x10]
lea eax, [edx - 0x10]
mov byte [ebp - 4], 9
mov dword [ebp - 0xf0], ecx
cmp eax, ecx
je 0x4773ed
cmp dword [ecx + 0xc], 0
lea eax, [ecx + 0xc]
mov dword [ebp - 0xf8], eax
jl 0x4773d8
mov eax, dword [edx - 0x10]
lea esi, [edx - 0x10]
mov dword [ebp - 0xec], eax
cmp eax, dword [ecx]
jne 0x4773d8
mov eax, dword [eax]
mov ecx, dword [ebp - 0xec]
call dword [eax + 0x10]
cmp dword [esi + 0xc], 0
lea edx, [esi + 0xc]
mov ecx, eax
jl 0x477364
cmp ecx, dword [esi]
jne 0x477364
mov eax, 1
lock xadd dword [edx], eax
jmp 0x4773ad
mov eax, dword [ecx]
push 2
push dword [esi + 4]
call dword [eax]
mov edx, eax
mov dword [ebp - 0xec], edx
test edx, edx
jne 0x47737e
call fcn.0040cb60
mov eax, dword [esi + 4]
mov dword [edx + 4], eax
mov ecx, dword [esi + 4]
lea eax, [ecx*2 + 2]
push eax
lea eax, [esi + 0x10]
push eax
lea eax, [ecx*2 + 2]
push eax
lea eax, [edx + 0x10]
push eax
call fcn.004f18c0
mov esi, dword [ebp - 0xec]
add esp, 0x10
mov ecx, dword [ebp - 0xf8]
or eax, 0xffffffff
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x4773cd
mov edx, dword [ebp - 0xf0]
push edx
mov ecx, dword [edx]
mov eax, dword [ecx]
call dword [eax + 4]
add esi, 0x10
mov dword [ebp - 0xe8], esi
jmp 0x4773ed
push dword [edx - 0xc]
lea ecx, [ebp - 0xe8]
push edx
call fcn.0040c730
mov esi, dword [ebp - 0xe8]
mov edx, dword [ebp - 0x108]
add edx, 0xfffffff0
mov byte [ebp - 4], 6
lea eax, [edx + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x477149
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x477149
mov esi, dword [ebp - 0xfc]
test esi, esi
jne 0x477428
xor ecx, ecx
jmp 0x47743f
mov ecx, esi
lea edx, [ecx + 2]
lea ecx, [ecx]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x477430
sub ecx, edx
sar ecx, 1
push ecx
push esi
lea ecx, [ebp - 0xe8]
call fcn.0040c730
lea eax, [ebp - 0xe8]
push eax
lea eax, [ebp + 8]
push eax
lea eax, [ebp - 0x10c]
push eax
call fcn.00402a80
add esp, 0xc
mov edx, dword [eax]
lea esi, [edi - 0x10]
lea ecx, [edx - 0x10]
mov byte [ebp - 4], 0xa
cmp ecx, esi
je 0x4774ce
cmp dword [esi + 0xc], 0
lea edi, [esi + 0xc]
jl 0x4774b9
mov eax, dword [ecx]
cmp eax, dword [esi]
jne 0x4774b9
push ecx
call fcn.004056f0
add esp, 4
mov dword [ebp - 0xec], eax
or ecx, 0xffffffff
lock xadd dword [edi], ecx
dec ecx
test ecx, ecx
jg 0x4774ae
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0xec]
lea edi, [eax + 0x10]
mov dword [ebp - 0xe4], edi
jmp 0x4774ce
push dword [edx - 0xc]
lea ecx, [ebp - 0xe4]
push edx
call fcn.0040c730
mov edi, dword [ebp - 0xe4]
mov edx, dword [ebp - 0x10c]
add edx, 0xfffffff0
mov byte [ebp - 4], 6
lea eax, [edx + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4774f2
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov esi, dword [ebp - 0xe8]
push 0x2f
push esi
call fcn.004f2e19
mov ecx, eax
add esp, 8
test ecx, ecx
jne 0x47750e
or ecx, 0xffffffff
jmp 0x477512
sub ecx, esi
sar ecx, 1
mov eax, dword [esi - 0xc]
dec eax
push 0
cmp ecx, eax
jne 0x47753a
push edi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
lea ecx, [ebp - 0xa0]
call fcn.004768f0
mov eax, dword [ebp - 0x104]
inc eax
jmp 0x47701a
push 0x80
push 2
push 0
push 0
push 0x40000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0xe0], eax
jmp 0x477560
push 0x4000
push dword [ebp - 0x100]
lea ecx, [ebp - 0xa0]
call fcn.00476cc0
test eax, eax
jne 0x4775a9
push dword [ebp - 0xe0]
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
push dword [ebp - 0xe0]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [ebp - 0xa0]
call fcn.004768f0
mov eax, dword [ebp - 0x104]
inc eax
jmp 0x47701a
push 0
lea ecx, [ebp - 0x118]
push ecx
push eax
push dword [ebp - 0x100]
push dword [ebp - 0xe0]
call dword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x477560
push dword [ebp - 0xf4]
call fcn.004f0683
mov eax, dword [ebp - 0xfc]
push eax
call fcn.004f0683
push dword [ebp - 0x100]
call fcn.004f0683
add ebx, 0xfffffff0
add esp, 0xc
mov byte [ebp - 4], 5
lea eax, [ebx + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x47760a
mov ecx, dword [ebx]
push ebx
mov eax, dword [ecx]
call dword [eax + 4]
add edi, 0xfffffff0
or ebx, 0xffffffff
mov byte [ebp - 4], 4
lea eax, [edi + 0xc]
mov ecx, ebx
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x47762a
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
add esi, 0xfffffff0
mov byte [ebp - 4], 3
lea eax, [esi + 0xc]
mov ecx, ebx
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x477647
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
lea ecx, [ebp - 0xa0]
call fcn.00476720
mov edx, dword [ebp + 8]
add edx, 0xfffffff0
mov byte [ebp - 4], 0
lea eax, [edx + 0xc]
mov ecx, ebx
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x477672
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp + 0xc]
add edx, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea eax, [edx + 0xc]
lock xadd dword [eax], ebx
dec ebx
test ebx, ebx
jg 0x477693
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov al, 1
jmp 0x4776af
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.004f0cd4
mov esp, ebp
pop ebp
ret