Function at 0x40af54
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 0x40b111
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 0x40af9c
inc eax
mov dword [0x4187a4], eax
mov dl, byte [ecx]
mov byte [eax], dl
inc ecx
jmp 0x40af86
push dword [0x4187b8]
call fcn.0040b594
test eax, eax
pop ecx
je 0x40afcc
mov ecx, dword [0x4187a8]
mov al, byte [esi]
mov byte [ecx], al
mov eax, dword [0x4187a8]
cmp byte [eax], bl
je 0x40afd9
inc eax
mov dword [0x4187a8], eax
mov cl, byte [edi]
mov byte [eax], cl
inc edi
jmp 0x40afb6
push 0x4187a8
push esi
call fcn.0040ae28
pop ecx
pop ecx
mov eax, dword [0x4187a4]
push 1
sub eax, dword [0x4187b8]
pop esi
cmp eax, 0x102
jle 0x40aff1
mov dword [ebp + 0xc], esi
push dword [0x41879c]
call fcn.0040d420
inc eax
push eax
call fcn.0040d56c
push dword [0x41879c]
mov edi, eax
push edi
call fcn.0040d330
push edi
call fcn.0040d20e
add esp, 0x14
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x40b0b4
cmp dword [0x431668], ebx
jne 0x40b04f
push dword [0x4187b8]
call fcn.0040d5f8
push dword [0x41879c]
call fcn.0040d5f8
pop ecx
pop ecx
push 2
pop ebx
jmp 0x40b0a6
cmp dword [ebp + 0xc], ebx
jne 0x40b0e7
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
je 0x40b0b8
push dword [0x41879c]
mov dword [0x4187a0], esi
push 0xaa
call fcn.0040b8d1
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.0040d5f8
pop ecx
mov eax, ebx
jmp 0x40b565
test al, 0x10
jne 0x40b0e2
push 0x416fd0
call fcn.0040eafc
push dword [0x4187b8]
call fcn.0040d5f8
push dword [0x41879c]
call fcn.0040d5f8
add esp, 0xc
push 3
jmp 0x40b04c
cmp dword [ebp + 0xc], ebx
je 0x40b07c
push 0x416fd0
call fcn.0040eafc
push dword [0x4187b8]
call fcn.0040d5f8
push dword [0x41879c]
call fcn.0040d5f8
add esp, 0xc
push 4
jmp 0x40b04c
cmp eax, 4
jne 0x40b15c
push dword [0x41879c]
push dword [ebp + 8]
call fcn.0040d330
push dword [0x41879c]
call fcn.0040d5f8
push dword [0x4187b8]
call fcn.0040d5f8
add esp, 0x10
xor ebx, ebx
mov dword [0x4187a8], ebx
mov dword [0x4187a4], ebx
mov dword [0x41879c], ebx
mov dword [0x4187b8], ebx
jmp 0x40b55e
cmp eax, 3
jne 0x40b217
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 0x40b1c7
inc eax
mov ecx, eax
mov dword [0x4187a4], eax
sub ecx, dword [0x4187b8]
cmp ecx, 0x105
jl 0x40b1bb
dec eax
push 0x416fd0
mov dword [0x4187a4], eax
mov byte [eax], bl
call fcn.0040eafc
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 0x40b17d
mov eax, dword [0x416bc0]
test byte [eax + 0x28], 0x20
jne 0x40b1f7
push dword [0x4187b8]
call fcn.0040b594
test eax, eax
pop ecx
jne 0x40b1f7
push 0x4187a8
push esi
call fcn.0040ae28
pop ecx
pop ecx
mov eax, dword [ebp + 0xc]
jmp 0x40b565
mov ecx, dword [0x4187a8]
mov al, byte [esi]
mov byte [ecx], al
mov eax, dword [0x4187a8]
cmp byte [eax], bl
je 0x40b1ef
inc eax
mov dword [0x4187a8], eax
mov cl, byte [edi]
mov byte [eax], cl
inc edi
jmp 0x40b201
cmp eax, 1
jne 0x40b3ae
mov eax, dword [0x4187ac]
mov ecx, dword [0x4187bc]
lea eax, [ecx + eax + 1]
push eax
call fcn.0040d56c
xor ebx, ebx
pop ecx
cmp eax, ebx
mov dword [0x4187b8], eax
je 0x40b26c
mov eax, dword [0x4187ac]
mov ecx, dword [0x4187bc]
lea eax, [ecx + eax + 1]
push eax
call fcn.0040d56c
cmp eax, ebx
pop ecx
mov dword [0x41879c], eax
jne 0x40b273
push dword [0x4187b8]
call fcn.0040d5f8
pop ecx
push 0xa
jmp 0x40b564
mov eax, dword [0x416bc0]
test byte [eax + 0x28], 0x20
je 0x40b33e
cmp dword [0x4187b0], ebx
je 0x40b28f
mov eax, dword [ebp + 8]
jmp 0x40b298
mov eax, dword [0x4187b4]
cmp eax, ebx
je 0x40b2aa
cmp byte [eax + 1], 0x3a
jne 0x40b2aa
movsx eax, byte [eax]
push eax
call fcn.0040dbfe
pop ecx
jmp 0x40b2e2
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 0x40b2d1
push 1
jmp 0x40b564
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 0x40b324
cmp byte [ecx], 0x61
jl 0x40b324
cmp edx, 1
jne 0x40b320
push eax
call fcn.0040b56a
pop ecx
mov ecx, dword [0x4187b8]
test eax, eax
je 0x40b324
mov byte [ecx], bl
jmp 0x40b36f
push ecx
call fcn.0040d5f8
push dword [0x41879c]
call fcn.0040d5f8
pop ecx
pop ecx
push 0x4e
jmp 0x40b564
cmp dword [0x4187b0], ebx
je 0x40b358
push dword [ebp + 8]
push dword [0x4187b8]
call fcn.0040d330
pop ecx
pop ecx
jmp 0x40b36f
cmp dword [0x4187bc], ebx
jle 0x40b368
push dword [0x4187b4]
jmp 0x40b349
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 0x40b55e
inc eax
inc dword [0x4187a4]
mov ecx, dword [0x4187a4]
mov dword [0x4187a8], eax
mov cl, byte [ecx]
mov byte [eax], cl
jmp 0x40b389
xor ebx, ebx
cmp eax, ebx
jne 0x40b545
mov esi, dword [ebp + 8]
cmp esi, ebx
jne 0x40b3c6
xor eax, eax
jmp 0x40b4f5
push esi
call fcn.0040d420
cmp eax, ebx
pop ecx
mov dword [0x4187bc], eax
jle 0x40b55e
xor edi, edi
cmp dword [0x416e1c], 1
mov dword [ebp + 8], ebx
mov dword [ebp + 0xc], 2
jle 0x40b408
movsx eax, byte [esi]
push 0x103
push eax
call fcn.0040dd38
pop ecx
pop ecx
mov ecx, eax
mov eax, dword [0x4187bc]
jmp 0x40b41b
movsx ecx, byte [esi]
mov edx, dword [str.________________________________H]
mov cx, word [edx + ecx*2]
and ecx, 0x103
cmp ecx, ebx
je 0x40b42c
cmp byte [esi + 1], 0x3a
jne 0x40b42c
mov dword [ebp + 8], 1
cmp byte [eax + esi - 1], 0x2f
jne 0x40b444
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 0x40b45f
cmp eax, 2
jne 0x40b45f
cmp edi, ebx
jne 0x40b4dd
mov dword [ebp + 0xc], 3
jmp 0x40b4dd
cmp eax, ebx
jle 0x40b4dd
push esi
call fcn.0040d420
inc eax
push eax
call fcn.0040d56c
mov edi, eax
push esi
push edi
call fcn.0040d330
push edi
call fcn.0040d20e
add esp, 0x14
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x40b4d1
cmp dword [0x431668], ebx
jne 0x40b4a1
push edi
call fcn.0040d5f8
pop ecx
push 2
jmp 0x40b4f4
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
jne 0x40b4c4
push edi
call fcn.0040d5f8
mov dword [esp], 0x416fd0
call fcn.0040eafc
pop ecx
push 3
jmp 0x40b4f4
push esi
push 0xaa
call fcn.0040b8d1
pop ecx
pop ecx
push edi
call fcn.0040d5f8
mov eax, dword [0x4187bc]
pop ecx
mov edi, dword [ebp + 0xc]
add eax, edi
push eax
call fcn.0040d56c
cmp eax, ebx
pop ecx
mov dword [0x4187b4], eax
jne 0x40b4fd
push 0xa
pop eax
mov dword [0x4187bc], ebx
jmp 0x40b565
push esi
push eax
call fcn.0040d330
pop ecx
cmp edi, 3
pop ecx
jne 0x40b520
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 0x40b55e
cmp eax, 5
jne 0x40b562
cmp dword [0x4187bc], ebx
jle 0x40b55e
push dword [0x4187b4]
call fcn.0040d5f8
pop ecx
xor eax, eax
jmp 0x40b565
push 0x63
pop eax
pop edi
pop esi
pop ebx
leave
ret