Function at 0x40af44
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x104
mov eax, dword [ebp + 0xc]
push ebx
and eax, 7
push esi
cmp eax, 2
push edi
jne 0x40b101
mov esi, dword [ebp + 8]
mov ecx, dword [0x4187a4]
xor ebx, ebx
mov al, byte [esi]
lea edi, [esi + 1]
mov byte [ecx], al
mov dword [ebp + 0xc], ebx
mov ecx, edi
mov eax, dword [0x4187a4]
cmp byte [eax], bl
je 0x40af8c
inc eax
mov dword [0x4187a4], eax
mov dl, byte [ecx]
mov byte [eax], dl
inc ecx
jmp 0x40af76
push dword [0x4187b8]
call fcn.0040b584
test eax, eax
pop ecx
je 0x40afbc
mov ecx, dword [0x4187a8]
mov al, byte [esi]
mov byte [ecx], al
mov eax, dword [0x4187a8]
cmp byte [eax], bl
je 0x40afc9
inc eax
mov dword [0x4187a8], eax
mov cl, byte [edi]
mov byte [eax], cl
inc edi
jmp 0x40afa6
push 0x4187a8
push esi
call fcn.0040ae18
pop ecx
pop ecx
mov eax, dword [0x4187a4]
push 1
sub eax, dword [0x4187b8]
pop esi
cmp eax, 0x102
jle 0x40afe1
mov dword [ebp + 0xc], esi
push dword [0x41879c]
call fcn.0040d410
inc eax
push eax
call fcn.0040d55c
push dword [0x41879c]
mov edi, eax
push edi
call fcn.0040d320
push edi
call fcn.0040d1fe
add esp, 0x14
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x40b0a4
cmp dword [0x431668], ebx
jne 0x40b03f
push dword [0x4187b8]
call fcn.0040d5e8
push dword [0x41879c]
call fcn.0040d5e8
pop ecx
pop ecx
push 2
pop ebx
jmp 0x40b096
cmp dword [ebp + 0xc], ebx
jne 0x40b0d7
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
je 0x40b0a8
push dword [0x41879c]
mov dword [0x4187a0], esi
push 0xaa
call fcn.0040b8c1
pop ecx
pop ecx
mov eax, dword [0x4187a4]
mov byte [eax], 0x2f
mov eax, dword [0x4187a8]
inc dword [0x4187a4]
mov byte [eax], 0x2f
inc dword [0x4187a8]
mov eax, dword [0x4187a8]
mov byte [eax], bl
mov eax, dword [0x4187a4]
mov byte [eax], bl
push edi
call fcn.0040d5e8
pop ecx
mov eax, ebx
jmp 0x40b555
test al, 0x10
jne 0x40b0d2
push 0x416fd0
call fcn.0040eaec
push dword [0x4187b8]
call fcn.0040d5e8
push dword [0x41879c]
call fcn.0040d5e8
add esp, 0xc
push 3
jmp 0x40b03c
cmp dword [ebp + 0xc], ebx
je 0x40b06c
push 0x416fd0
call fcn.0040eaec
push dword [0x4187b8]
call fcn.0040d5e8
push dword [0x41879c]
call fcn.0040d5e8
add esp, 0xc
push 4
jmp 0x40b03c
cmp eax, 4
jne 0x40b14c
push dword [0x41879c]
push dword [ebp + 8]
call fcn.0040d320
push dword [0x41879c]
call fcn.0040d5e8
push dword [0x4187b8]
call fcn.0040d5e8
add esp, 0x10
xor ebx, ebx
mov dword [0x4187a8], ebx
mov dword [0x4187a4], ebx
mov dword [0x41879c], ebx
mov dword [0x4187b8], ebx
jmp 0x40b54e
cmp eax, 3
jne 0x40b207
mov esi, dword [ebp + 8]
mov ecx, dword [0x4187a4]
xor ebx, ebx
mov al, byte [esi]
lea edi, [esi + 1]
mov dword [ebp + 0xc], ebx
mov byte [ecx], al
mov dword [ebp + 8], edi
mov eax, dword [0x4187a4]
cmp byte [eax], bl
je 0x40b1b7
inc eax
mov ecx, eax
mov dword [0x4187a4], eax
sub ecx, dword [0x4187b8]
cmp ecx, 0x105
jl 0x40b1ab
dec eax
push 0x416fd0
mov dword [0x4187a4], eax
mov byte [eax], bl
call fcn.0040eaec
mov eax, dword [0x4187a4]
pop ecx
mov dword [ebp + 0xc], 1
mov ecx, dword [ebp + 8]
inc dword [ebp + 8]
mov cl, byte [ecx]
mov byte [eax], cl
jmp 0x40b16d
mov eax, dword [0x416bc0]
test byte [eax + 0x28], 0x20
jne 0x40b1e7
push dword [0x4187b8]
call fcn.0040b584
test eax, eax
pop ecx
jne 0x40b1e7
push 0x4187a8
push esi
call fcn.0040ae18
pop ecx
pop ecx
mov eax, dword [ebp + 0xc]
jmp 0x40b555
mov ecx, dword [0x4187a8]
mov al, byte [esi]
mov byte [ecx], al
mov eax, dword [0x4187a8]
cmp byte [eax], bl
je 0x40b1df
inc eax
mov dword [0x4187a8], eax
mov cl, byte [edi]
mov byte [eax], cl
inc edi
jmp 0x40b1f1
cmp eax, 1
jne 0x40b39e
mov eax, dword [0x4187ac]
mov ecx, dword [0x4187bc]
lea eax, [ecx + eax + 1]
push eax
call fcn.0040d55c
xor ebx, ebx
pop ecx
cmp eax, ebx
mov dword [0x4187b8], eax
je 0x40b25c
mov eax, dword [0x4187ac]
mov ecx, dword [0x4187bc]
lea eax, [ecx + eax + 1]
push eax
call fcn.0040d55c
cmp eax, ebx
pop ecx
mov dword [0x41879c], eax
jne 0x40b263
push dword [0x4187b8]
call fcn.0040d5e8
pop ecx
push 0xa
jmp 0x40b554
mov eax, dword [0x416bc0]
test byte [eax + 0x28], 0x20
je 0x40b32e
cmp dword [0x4187b0], ebx
je 0x40b27f
mov eax, dword [ebp + 8]
jmp 0x40b288
mov eax, dword [0x4187b4]
cmp eax, ebx
je 0x40b29a
cmp byte [eax + 1], 0x3a
jne 0x40b29a
movsx eax, byte [eax]
push eax
call fcn.0040dbee
pop ecx
jmp 0x40b2d2
lea eax, [ebp + 8]
mov esi, 0x104
push eax
lea eax, [ebp - 0x104]
push eax
push esi
push 0x416ba8
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
cmp eax, esi
jbe 0x40b2c1
push 1
jmp 0x40b554
movsx eax, byte [ebp - 0x104]
sub eax, 0x60
mov dword [0x418798], eax
add al, 0x60
mov ecx, dword [0x4187b8]
mov byte [ecx], al
mov ecx, dword [0x4187b8]
mov edx, dword [0x431670]
movsx eax, byte [ecx]
sub eax, 0x60
cmp edx, ebx
mov dword [0x418798], eax
je 0x40b314
cmp byte [ecx], 0x61
jl 0x40b314
cmp edx, 1
jne 0x40b310
push eax
call fcn.0040b55a
pop ecx
mov ecx, dword [0x4187b8]
test eax, eax
je 0x40b314
mov byte [ecx], bl
jmp 0x40b35f
push ecx
call fcn.0040d5e8
push dword [0x41879c]
call fcn.0040d5e8
pop ecx
pop ecx
push 0x4e
jmp 0x40b554
cmp dword [0x4187b0], ebx
je 0x40b348
push dword [ebp + 8]
push dword [0x4187b8]
call fcn.0040d320
pop ecx
pop ecx
jmp 0x40b35f
cmp dword [0x4187bc], ebx
jle 0x40b358
push dword [0x4187b4]
jmp 0x40b339
mov eax, dword [0x4187b8]
mov byte [eax], bl
mov eax, dword [0x4187b8]
mov ecx, dword [0x41879c]
mov dword [0x4187a4], eax
mov dword [0x4187a8], ecx
mov al, byte [eax]
mov byte [ecx], al
mov eax, dword [0x4187a8]
cmp byte [eax], bl
je 0x40b54e
inc eax
inc dword [0x4187a4]
mov ecx, dword [0x4187a4]
mov dword [0x4187a8], eax
mov cl, byte [ecx]
mov byte [eax], cl
jmp 0x40b379
xor ebx, ebx
cmp eax, ebx
jne 0x40b535
mov esi, dword [ebp + 8]
cmp esi, ebx
jne 0x40b3b6
xor eax, eax
jmp 0x40b4e5
push esi
call fcn.0040d410
cmp eax, ebx
pop ecx
mov dword [0x4187bc], eax
jle 0x40b54e
xor edi, edi
cmp dword [0x416e1c], 1
mov dword [ebp + 8], ebx
mov dword [ebp + 0xc], 2
jle 0x40b3f8
movsx eax, byte [esi]
push 0x103
push eax
call fcn.0040dd28
pop ecx
pop ecx
mov ecx, eax
mov eax, dword [0x4187bc]
jmp 0x40b40b
movsx ecx, byte [esi]
mov edx, dword [str.________________________________H]
mov cx, word [edx + ecx*2]
and ecx, 0x103
cmp ecx, ebx
je 0x40b41c
cmp byte [esi + 1], 0x3a
jne 0x40b41c
mov dword [ebp + 8], 1
cmp byte [eax + esi - 1], 0x2f
jne 0x40b434
dec eax
push 1
mov dword [0x4187bc], eax
pop edi
mov byte [eax + esi], bl
mov eax, dword [0x4187bc]
cmp dword [ebp + 8], ebx
je 0x40b44f
cmp eax, 2
jne 0x40b44f
cmp edi, ebx
jne 0x40b4cd
mov dword [ebp + 0xc], 3
jmp 0x40b4cd
cmp eax, ebx
jle 0x40b4cd
push esi
call fcn.0040d410
inc eax
push eax
call fcn.0040d55c
mov edi, eax
push esi
push edi
call fcn.0040d320
push edi
call fcn.0040d1fe
add esp, 0x14
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x40b4c1
cmp dword [0x431668], ebx
jne 0x40b491
push edi
call fcn.0040d5e8
pop ecx
push 2
jmp 0x40b4e4
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
jne 0x40b4b4
push edi
call fcn.0040d5e8
mov dword [esp], 0x416fd0
call fcn.0040eaec
pop ecx
push 3
jmp 0x40b4e4
push esi
push 0xaa
call fcn.0040b8c1
pop ecx
pop ecx
push edi
call fcn.0040d5e8
mov eax, dword [0x4187bc]
pop ecx
mov edi, dword [ebp + 0xc]
add eax, edi
push eax
call fcn.0040d55c
cmp eax, ebx
pop ecx
mov dword [0x4187b4], eax
jne 0x40b4ed
push 0xa
pop eax
mov dword [0x4187bc], ebx
jmp 0x40b555
push esi
push eax
call fcn.0040d320
pop ecx
cmp edi, 3
pop ecx
jne 0x40b510
mov eax, dword [0x4187bc]
mov ecx, dword [0x4187b4]
mov byte [ecx + eax], 0x2e
inc dword [0x4187bc]
mov eax, dword [0x4187b4]
mov ecx, dword [0x4187bc]
mov byte [eax + ecx], 0x2f
inc dword [0x4187bc]
mov eax, dword [0x4187b4]
mov ecx, dword [0x4187bc]
mov byte [eax + ecx], bl
jmp 0x40b54e
cmp eax, 5
jne 0x40b552
cmp dword [0x4187bc], ebx
jle 0x40b54e
push dword [0x4187b4]
call fcn.0040d5e8
pop ecx
xor eax, eax
jmp 0x40b555
push 0x63
pop eax
pop edi
pop esi
pop ebx
leave
ret