Function at 0x40519e
Capabilities:
Create directory
Get file attributes
Resolve function by parsing pe exports
Set file attributes

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x2c
mov eax, dword [esp + 0x40]
mov dword [esp + 0x20], eax
mov ebp, dword [esp + 0x44]
mov dword [eax + 0x400c8], 0xffffffff
mov edx, eax
mov eax, dword [eax + 0x6c]
mov dword [esp + 4], eax
mov eax, dword [edx + 0x68]
add eax, 0x3c
mov dword [esp], eax
call fcn.004326e0
mov edx, dword [eax + 4]
mov eax, dword [eax]
mov ecx, dword [esp + 0x20]
mov dword [ecx + 0x400b0], eax
mov dword [ecx + 0x400b4], edx
cmp ebp, 1
jne 0x4051fe
mov eax, dword [ecx + 0x400b4]
or eax, dword [ecx + 0x400b0]
je 0x4057d1
mov ebx, dword [esp + 0x20]
mov eax, dword [ebx + 0x6c]
mov dword [esp + 8], eax
mov eax, dword [ebx + 0x68]
mov dword [esp + 4], eax
mov eax, dword [ebx]
mov dword [esp], eax
call fcn.00405074
mov dword [ebx + 0x70], eax
mov eax, dword [ebx]
cmp byte [eax], 0x65
jne 0x40523d
mov eax, dword [ebx + 0x6c]
mov dword [esp + 4], eax
mov eax, dword [ebx + 0x68]
add eax, 0x30
mov dword [esp], eax
call fcn.0043223c
mov edx, dword [eax]
jmp 0x405282
mov eax, dword [esp + 0x20]
add eax, 0xb0
mov dword [esp + 8], eax
mov edi, dword [esp + 0x20]
mov eax, dword [edi + 0x6c]
mov dword [esp + 4], eax
mov eax, dword [edi + 0x68]
mov dword [esp], eax
call fcn.00402c0c
mov ebx, eax
mov eax, dword [edi]
lea ecx, [eax + 0xc]
mov edx, ebx
cmp byte [eax + 0xc], 0
je 0x405282
mov edx, ecx
cld
mov ecx, 0xffffffff
mov al, 0
mov edi, edx
repne scasb al, byte es:[edi]
not ecx
lea edx, [ebx + ecx]
mov dword [esp + 4], edx
mov edx, dword [esp + 0x20]
mov eax, dword [edx + 0x8c]
mov dword [esp], eax
call sub.msvcrt.dll_strcpy
mov ecx, dword [esp + 0x20]
mov eax, dword [ecx + 0x84]
mov dword [esp + 4], eax
mov eax, dword [ecx + 0x88]
mov dword [esp], eax
call fcn.0040d56a
mov ebx, dword [esp + 0x20]
cmp dword [ebx + 0x70], 0
je 0x405687
mov eax, dword [ebx]
cmp byte [eax], 0x74
je 0x405687
mov eax, dword [ebx + 0x6c]
mov dword [esp + 4], eax
mov eax, dword [ebx + 0x68]
add eax, 0x54
mov dword [esp], eax
call fcn.00432428
cmp dword [eax], 0
je 0x405313
mov eax, dword [ebx]
cmp byte [eax], 0x65
je 0x405687
mov eax, dword [ebx + 0x84]
mov dword [esp], eax
call fcn.0040de8c
mov eax, dword [ebx + 0x84]
mov dword [esp], eax
call sub.msvcrt.dll__wmkdir
jmp 0x405687
mov edi, dword [esp + 0x20]
mov eax, dword [edi + 0x84]
mov dword [esp + 4], 0
mov dword [esp], eax
call sub.msvcrt.dll__waccess
test eax, eax
sete byte [esp + 0x2b]
cmp byte [esp + 0x2b], 0
je 0x405430
mov eax, dword [edi]
cmp dword [eax + 0x4007c], 0
je 0x405356
mov dword [edi + 0x70], 0
jmp 0x405430
mov edx, dword [esp + 0x20]
mov eax, dword [edx]
cmp dword [eax + 0x40078], 0
jne 0x405430
mov eax, dword [edx + 0x6c]
mov dword [esp + 4], eax
mov eax, dword [edx + 0x68]
add eax, 0x48
mov dword [esp], eax
call fcn.004325f8
mov esi, eax
mov ecx, dword [esp + 0x20]
mov eax, dword [ecx + 0x6c]
mov dword [esp + 4], eax
mov eax, dword [ecx + 0x68]
add eax, 0x3c
mov dword [esp], eax
call fcn.004326e0
mov ebx, dword [esp + 0x20]
mov ecx, dword [ebx + 0x84]
mov edx, dword [ebx + 4]
mov ebx, dword [edx]
mov edx, dword [esi]
mov dword [esp + 0x10], edx
mov edx, dword [eax + 4]
mov eax, dword [eax]
mov dword [esp + 8], eax
mov dword [esp + 0xc], edx
mov dword [esp + 4], ecx
mov edi, dword [esp + 0x20]
mov eax, dword [edi + 4]
mov dword [esp], eax
call dword [ebx + 0x28]
cmp al, 0x6e
je 0x4053e4
cmp al, 0x6e
jg 0x4053da
cmp al, 0x61
je 0x4053f1
jmp 0x405430
cmp al, 0x71
je 0x40541c
cmp al, 0x73
je 0x405403
jmp 0x405430
mov eax, dword [esp + 0x20]
mov dword [eax + 0x70], 0
jmp 0x405430
mov edx, dword [esp + 0x20]
mov eax, dword [edx]
mov dword [eax + 0x40078], 1
jmp 0x405430
mov ecx, dword [esp + 0x20]
mov eax, dword [ecx]
mov dword [eax + 0x4007c], 1
mov dword [ecx + 0x70], 0
jmp 0x405430
mov dword [esp + 4], 0xfffffff6
mov ebx, dword [esp + 0x20]
mov dword [esp], ebx
call fcn.00409528
mov edi, dword [esp + 0x20]
cmp dword [edi + 0x70], 0
je 0x405687
cmp byte [esp + 0x2b], 0
je 0x40546e
mov eax, dword [edi + 0x84]
mov dword [esp], eax
call sub.KERNEL32.DLL_GetFileAttributesW
sub esp, 4
and eax, 0xfffffffa
mov dword [esp + 4], eax
mov eax, dword [edi + 0x84]
mov dword [esp], eax
call sub.KERNEL32.DLL_SetFileAttributesW
sub esp, 8
mov eax, dword [esp + 0x20]
add eax, 0x78
mov dword [esp + 0x24], eax
mov esi, eax
mov edx, dword [esp + 0x20]
mov eax, dword [edx + 0x84]
mov dword [esp], eax
call fcn.0040de8c
mov ebx, dword [esp + 0x20]
sub ebx, 0xffffff80
mov dword [esp + 8], 0x180
mov dword [esp + 4], 0x8301
mov eax, dword [esi + 0xc]
mov dword [esp], eax
call sub.msvcrt.dll__wopen
mov dword [ebx], eax
mov eax, dword [esi + 8]
not eax
shr eax, 0x1f
test al, al
jne 0x405687
cmp dword [0x6fb4d0], 0
je 0x4054de
mov dword [esp + 4], 1
mov dword [esp], 0x6fb4f0
call sub.msvcrt.dll_longjmp
mov dword [esp], 0x40000
call sub.msvcrt.dll_malloc
test eax, eax
jne 0x405583
cmp dword [0x6fb4d0], 0
je 0x40550f
mov dword [esp + 4], 1
mov dword [esp], 0x6fb4f0
call sub.msvcrt.dll_longjmp
mov dword [esp], 0x40000
call fcn.00401942
mov ebx, eax
mov dword [esp], 0x40000
call fcn.00401942
mov esi, eax
mov dword [esp + 8], 0x40000
mov dword [esp + 4], 0x436000
mov dword [esp], ebx
call sub.msvcrt.dll_sprintf
mov dword [esp + 4], esi
mov dword [esp], ebx
call fcn.0040d56a
mov dword [esp + 0xc], 0x10
mov dword [esp + 8], str.Error_encountered
mov dword [esp + 4], esi
mov dword [esp], 0
call sub.USER32.dll_MessageBoxW
sub esp, 0x10
call fcn.0040996a
mov dword [esp], 2
call sub.msvcrt.dll_exit
mov esi, eax
mov dword [esp], 0x40000
call sub.msvcrt.dll_malloc
mov ebx, eax
test eax, eax
jne 0x40562c
cmp dword [0x6fb4d0], 0
je 0x4055b8
mov dword [esp + 4], 1
mov dword [esp], 0x6fb4f0
call sub.msvcrt.dll_longjmp
mov dword [esp], 0x40000
call fcn.00401942
mov ebx, eax
mov dword [esp], 0x40000
call fcn.00401942
mov esi, eax
mov dword [esp + 8], 0x40000
mov dword [esp + 4], 0x436000
mov dword [esp], ebx
call sub.msvcrt.dll_sprintf
mov dword [esp + 4], esi
mov dword [esp], ebx
call fcn.0040d56a
mov dword [esp + 0xc], 0x10
mov dword [esp + 8], str.Error_encountered
mov dword [esp + 4], esi
mov dword [esp], 0
call sub.USER32.dll_MessageBoxW
sub esp, 0x10
call fcn.0040996a
mov dword [esp], 2
call sub.msvcrt.dll_exit
mov ecx, dword [esp + 0x24]
mov eax, dword [ecx + 0x10]
mov dword [esp + 8], eax
mov dword [esp + 4], str.ERROR:_cant_open_file__s
mov dword [esp], esi
call sub.msvcrt.dll_sprintf
mov dword [esp + 4], ebx
mov dword [esp], esi
call fcn.0040d56a
mov dword [esp + 0xc], 0x10
mov dword [esp + 8], str.Error_encountered
mov dword [esp + 4], ebx
mov dword [esp], 0
call sub.USER32.dll_MessageBoxW
sub esp, 0x10
call fcn.0040996a
mov dword [esp], 2
call sub.msvcrt.dll_exit
test ebp, ebp
je 0x4056bd
mov ebx, dword [esp + 0x20]
mov eax, dword [ebx + 0x6c]
mov dword [esp + 4], eax
mov eax, dword [ebx + 0x68]
add eax, 0x3c
mov dword [esp], eax
call fcn.004326e0
cmp dword [eax + 4], 0
jg 0x4056bd
cmp dword [eax + 4], 0
js 0x4057d1
cmp dword [eax], 0
jbe 0x4057d1
mov edi, dword [esp + 0x20]
mov eax, dword [edi + 0x6c]
mov dword [esp + 4], eax
mov eax, dword [edi + 0x68]
add eax, 0x54
mov dword [esp], eax
call fcn.00432428
cmp dword [eax], 0
je 0x4056e6
mov eax, dword [edi]
cmp byte [eax], 0x78
jne 0x4057d1
mov eax, dword [esp + 0x20]
add eax, 0xb0
mov dword [esp + 8], eax
mov edx, dword [esp + 0x20]
mov eax, dword [edx + 0x6c]
mov dword [esp + 4], eax
mov eax, dword [edx + 0x68]
mov dword [esp], eax
call fcn.00402c0c
mov dword [esp + 4], eax
mov ecx, dword [esp + 0x20]
mov eax, dword [ecx + 0xa8]
mov dword [esp], eax
call sub.msvcrt.dll_strcpy
mov ebx, dword [esp + 0x20]
mov eax, dword [ebx + 0xa0]
mov dword [esp + 4], eax
mov eax, dword [ebx + 0xa4]
mov dword [esp], eax
call fcn.0040d56a
mov edi, dword [esp + 0x20]
mov ebx, dword [edi + 0xa0]
mov eax, dword [edi + 0x6c]
mov dword [esp + 4], eax
mov eax, dword [edi + 0x68]
add eax, 0x54
mov dword [esp], eax
call fcn.00432428
cmp dword [eax], 0
setne al
movzx ecx, al
mov eax, dword [edi + 4]
mov esi, dword [eax]
add esi, 0x20
mov edi, dword [esp + 0x20]
mov eax, dword [edi + 0x400b0]
mov edx, dword [edi + 0x400b4]
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], edx
mov dword [esp + 0xc], ebx
mov eax, str.Skipping
cmp dword [edi + 0x70], 0
je 0x4057a5
mov eax, dword [edi]
mov edx, str.Testing
cmp byte [eax], 0x74
je 0x4057a3
mov edx, str.Extracting
mov eax, edx
mov dword [esp + 8], eax
mov dword [esp + 4], ecx
mov edx, dword [esp + 0x20]
mov eax, dword [edx + 4]
mov dword [esp], eax
call dword [esi]
test al, al
jne 0x4057d1
mov dword [esp + 4], 0xfffffff6
mov ecx, dword [esp + 0x20]
mov dword [esp], ecx
call fcn.00409528
add esp, 0x2c
pop ebx
pop esi
pop edi
pop ebp
ret