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

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x40cc
call fcn.0041a650
mov eax, dword [0x4243cc]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push edi
xor edi, edi
push dword [eax]
lea eax, [ebp - 0x24]
push eax
call fcn.00402150
add esp, 8
test eax, eax
je 0x410301
lea eax, [edi + 0xb]
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041a150
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x2c]
push ebx
push eax
call fcn.00401f80
lea eax, [ebp - 0x40b8]
push 0
push eax
call fcn.00405090
lea eax, [ebp - 0x2c]
mov dword [ebp - 0x40a8], eax
lea eax, [ebp - 0x40b8]
push eax
call fcn.004050c0
add esp, 0x10
mov dword [ebp - 0x3c], fcn.004010b0
mov dword [ebp - 0x38], fcn.004010d0
mov dword [ebp - 0x4c], fcn.004010b0
mov dword [ebp - 0x48], fcn.004010d0
call fcn.004011c0
lea eax, [ebp - 0x9c]
push eax
call fcn.00402720
lea eax, [ebp - 0x4c]
push eax
lea eax, [ebp - 0x3c]
push eax
lea eax, [ebp - 0x40b8]
push eax
lea eax, [ebp - 0x9c]
push eax
call fcn.00402790
mov ebx, eax
add esp, 0x14
mov dword [ebp - 0x40cc], ebx
test ebx, ebx
jne 0x410614
xor ecx, ecx
mov dword [ebp - 0x10], 0xffffffff
push esi
mov dword [ebp - 0x34], edi
mov dword [ebp - 0xc], edi
mov dword [ebp - 0x40c0], ecx
cmp dword [ebp - 0x80], ecx
jbe 0x4105ed
xor edx, edx
mov dword [ebp - 0x40c8], edx
nop dword [eax]
nop word [eax + eax]
mov ebx, dword [ebp - 0x8c]
lea eax, [ebp - 0x9c]
push 0
push ecx
add ebx, edx
mov dword [ebp - 0x40], 0
push eax
mov dword [ebp - 8], 0
mov dword [ebp - 0x40c4], ebx
call fcn.004026d0
mov esi, eax
add esp, 0xc
test esi, esi
je 0x410414
push edi
push 0
call fcn.004010d0
lea eax, [esi + esi]
push eax
push 0
call fcn.004010b0
mov edi, eax
add esp, 0x10
test edi, edi
je 0x4105da
mov esi, dword [ebp - 0x40c0]
lea eax, [ebp - 0x9c]
push edi
push esi
push eax
call fcn.004026d0
add esp, 0xc
cmp byte [ebx + 0x19], 0
jne 0x41046a
lea eax, [ebp - 0x4c]
push eax
lea eax, [ebp - 0x3c]
push eax
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x40]
push eax
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp - 0x10]
push eax
push esi
lea eax, [ebp - 0x40b8]
push eax
lea eax, [ebp - 0x9c]
push eax
call fcn.004021d0
add esp, 0x28
mov dword [ebp - 0x40cc], eax
movzx eax, word [edi]
xor ebx, ebx
mov ecx, eax
test ax, ax
je 0x4104ac
mov esi, edi
cmp cx, 0x2f
jne 0x41049d
xor eax, eax
push eax
push edi
mov word [esi], ax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x410495
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov eax, 0x5c
mov word [esi], ax
inc ebx
movzx eax, word [edi + ebx*2]
lea esi, [edi + ebx*2]
mov ecx, eax
test ax, ax
jne 0x410478
mov eax, dword [ebp - 0x40c4]
cmp byte [eax + 0x19], 0
je 0x4104d4
push 0
push edi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x4105ad
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x4105ad
lea eax, [ebp - 0x30]
push edi
push eax
call fcn.00402190
add esp, 8
test eax, eax
jne 0x4105e8
mov ebx, dword [ebp - 0x40]
add ebx, dword [ebp - 0x34]
mov esi, dword [ebp - 8]
test esi, esi
je 0x410564
mov dword [ebp - 0x40bc], eax
nop dword [eax]
push 0
lea eax, [ebp - 0x44]
mov dword [ebp - 0x44], 0
push eax
cmp esi, 0x400000
mov ecx, 0x400000
mov eax, esi
cmova eax, ecx
push eax
push ebx
push dword [ebp - 0x30]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, dword [ebp - 0x44]
add ebx, ecx
mov edx, dword [ebp - 0x40bc]
sub esi, ecx
add edx, ecx
mov dword [ebp - 0x40bc], edx
test eax, eax
je 0x41054b
test ecx, ecx
je 0x41055f
test esi, esi
jne 0x410500
jmp 0x41055f
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x4105e1
mov edx, dword [ebp - 0x40bc]
cmp edx, dword [ebp - 8]
jne 0x4105e1
mov ebx, dword [ebp - 0x40c4]
mov eax, dword [ebx + 4]
mov ecx, dword [ebx]
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x18]
push eax
push 0
lea eax, [ebp - 0x20]
mov dword [ebp - 0x18], ecx
push eax
push dword [ebp - 0x30]
mov dword [ebp - 0x20], ecx
call dword [sym.imp.KERNEL32.dll_SetFileTime]
lea eax, [ebp - 0x30]
push eax
call fcn.00402080
add esp, 4
test eax, eax
jne 0x4105e8
cmp byte [ebx + 0x1d], al
je 0x4105ad
push dword [ebx + 0x14]
push edi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov ecx, dword [ebp - 0x40c0]
mov edx, dword [ebp - 0x40c8]
inc ecx
add edx, 0x20
mov dword [ebp - 0x40c0], ecx
mov dword [ebp - 0x40c8], edx
cmp ecx, dword [ebp - 0x80]
jb 0x4103c0
mov ebx, dword [ebp - 0x40cc]
jmp 0x4105ed
mov ebx, 2
jmp 0x4105ed
mov ebx, 9
jmp 0x4105ed
mov ebx, 0xb
push dword [ebp - 0x34]
mov esi, dword [ebp - 0x38]
lea eax, [ebp - 0x3c]
push eax
mov ecx, esi
call dword [0x41d2f4]
call esi
add esp, 8
pop esi
test edi, edi
je 0x410614
push edi
push 0
call fcn.004010d0
add esp, 8
lea eax, [ebp - 0x3c]
push eax
lea eax, [ebp - 0x9c]
push eax
call fcn.004025e0
lea eax, [ebp - 0x24]
push eax
call fcn.00402080
mov ecx, dword [ebp - 4]
add esp, 0xc
mov eax, ebx
xor ecx, ebp
pop ebx
pop edi
call fcn.0041a150
mov esp, ebp
pop ebp
ret