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

Disassembly:
push 0x480
mov eax, 0x4fba2f
call fcn.004d2fe8
xor ebx, ebx
mov esi, ecx
mov dword [ebp - 0x32c], esi
cmp dword [ebp + 8], ebx
jne 0x476e0e
xor eax, eax
call fcn.004d306b
ret
push 0x105
lea eax, [ebp - 0x31f]
push ebx
push eax
mov byte [ebp - 0x320], bl
call fcn.004d7710
add esp, 0xc
mov edi, 0x104
push edi
lea eax, [ebp - 0x388]
push ebx
push eax
lea eax, [ebp - 0x320]
mov ecx, esi
call fcn.004a7180
add esp, 0xc
test eax, eax
jne 0x476e06
push 0x206
mov word [ebp - 0x218], ax
lea eax, [ebp - 0x216]
push ebx
push eax
call fcn.004d7710
mov edx, dword [ebp + 8]
lea eax, [ebp - 0x218]
mov ecx, eax
add esp, 0xc
sub edx, ecx
lea ecx, [edi + 0x7ffffefa]
test ecx, ecx
je 0x476e8f
movzx ecx, word [edx + eax]
cmp cx, bx
je 0x476e8f
mov word [eax], cx
inc eax
inc eax
dec edi
jne 0x476e74
cmp edi, ebx
jne 0x476e95
dec eax
dec eax
xor ecx, ecx
mov word [eax], cx
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAddBackslashW]
lea ecx, [ebp - 0x324]
call fcn.00408850
lea eax, [ebp - 0x488]
mov dword [ebp - 4], ebx
mov dword [ebp - 0x48c], eax
push 3
lea eax, [ebp - 0x320]
push eax
lea eax, [ebp - 0x48c]
call fcn.004180d0
mov byte [ebp - 4], 1
mov edx, dword [ebp - 0x48c]
lea edi, [ebp - 0x324]
call fcn.004085a0
lea eax, [ebp - 0x488]
mov byte [ebp - 4], bl
cmp dword [ebp - 0x48c], eax
je 0x476f07
push dword [ebp - 0x48c]
call fcn.004cc15e
pop ecx
push 0x5f
pop edi
push edi
push 0x3a
lea eax, [ebp - 0x324]
push eax
call fcn.0040be00
push edi
push 0x2a
lea eax, [ebp - 0x324]
push eax
call fcn.0040be00
push edi
push 0x3f
lea eax, [ebp - 0x324]
push eax
call fcn.0040be00
push edi
push 0x22
lea eax, [ebp - 0x324]
push eax
call fcn.0040be00
push edi
push 0x3c
lea eax, [ebp - 0x324]
push eax
call fcn.0040be00
push edi
push 0x3e
lea eax, [ebp - 0x324]
push eax
call fcn.0040be00
push edi
push 0x7c
lea eax, [ebp - 0x324]
push eax
call fcn.0040be00
push 0x5c
push 0x2f
lea eax, [ebp - 0x324]
push eax
call fcn.0040be00
push dword [ebp - 0x324]
lea eax, [ebp - 0x218]
call fcn.0047721d
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
cmp eax, ebx
je 0x476fdd
movzx eax, word [ebp + eax*2 - 0x21a]
cmp ax, 0x5c
je 0x476fb9
cmp ax, 0x2f
jne 0x476fdd
push ebx
lea eax, [ebp - 0x218]
push eax
push ebx
call dword [sym.imp.SHELL32.dll_SHCreateDirectoryExW]
xor ebx, ebx
inc ebx
lea ecx, [ebp - 0x324]
call fcn.004087f0
mov eax, ebx
jmp 0x476e08
cmp dword [ebp - 0x36c], ebx
jl 0x476fcb
push ebx
push 0x80
push 2
lea eax, [ebp - 0x218]
push ebx
jne 0x47700f
xor ebx, ebx
inc ebx
push ebx
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x476fcb
mov edi, dword [sym.imp.KERNEL32.dll_CreateFileW]
push 1
push 0x40000000
push eax
call edi
mov esi, eax
cmp esi, 0xffffffff
jne 0x4770e2
lea eax, [ebp - 0x328]
push eax
lea ecx, [ebp - 0x218]
call fcn.004085e0
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x328]
cmp dword [eax - 4], 1
jle 0x477061
push dword [eax - 0xc]
lea eax, [ebp - 0x328]
push eax
call fcn.004083b0
mov eax, dword [ebp - 0x328]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
or eax, 0xffffffff
lea esi, [ebp - 0x328]
call fcn.004080c0
mov eax, dword [ebp - 0x328]
cmp dword [eax - 4], 1
jle 0x477093
push dword [eax - 0xc]
mov eax, esi
push eax
call fcn.004083b0
mov eax, dword [ebp - 0x328]
push ebx
push eax
push ebx
call dword [sym.imp.SHELL32.dll_SHCreateDirectoryExW]
or eax, 0xffffffff
lea esi, [ebp - 0x328]
call fcn.004080c0
push ebx
push 0x80
push 2
push ebx
push 1
push 0x40000000
lea eax, [ebp - 0x218]
push eax
call edi
mov esi, eax
lea ecx, [ebp - 0x328]
cmp esi, 0xffffffff
jne 0x4770da
call fcn.004087f0
jmp 0x476fcb
mov byte [ebp - 4], bl
call fcn.004087f0
push dword [ebp - 0x32c]
mov dword [ebp - 0x330], ebx
call fcn.004a76a0
pop ecx
test eax, eax
jne 0x47713d
push 0x8000
call fcn.004cca0d
pop ecx
mov edi, eax
jmp 0x477118
push ebx
lea ecx, [ebp - 0x334]
push ecx
push eax
push edi
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push edi
push dword [ebp - 0x32c]
call fcn.004a7840
cmp eax, ebx
pop ecx
pop ecx
jg 0x477107
jne 0x477136
mov dword [ebp - 0x330], 1
push edi
call fcn.004cc15e
pop ecx
mov ebx, dword [ebp - 0x32c]
call fcn.004a7ab0
cmp eax, 0xffffff97
jne 0x477154
and dword [ebp - 0x330], 0
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, dword [ebp - 0x330]
jmp 0x476fcb