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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x44cff0
mov eax, dword fs:[0]
push eax
sub esp, 0x2c
push ebx
push esi
push edi
mov eax, dword [0x45a050]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
cmp byte [0x45c151], 0
jne 0x40bb74
mov edx, esi
lea ecx, [ebp - 0x2c]
call fcn.004096f0
push dword [eax]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
push dword [ebp - 0x2c]
mov ebx, eax
call fcn.004411c8
add esp, 4
jmp 0x40bb82
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x40bba0
cmp ebx, 0xffffffff
je 0x40bba0
test bl, 0x10
je 0x40bba0
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, esi
call fcn.0040ddc0
test al, al
je 0x40bbbf
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, esi
call fcn.0040dff0
push esi
lea ecx, [ebp - 0x20]
mov dword [ebp - 0x14], eax
call fcn.00409150
mov dword [ebp - 4], 0
mov ebx, dword [ebp - 0x20]
mov edi, dword [ebp - 0x1c]
lea ecx, [ebx + edi*2]
cmp ecx, ebx
je 0x40bc23
movzx eax, word [ecx - 2]
sub ecx, 2
cmp eax, 0x5c
je 0x40bbfd
cmp eax, 0x2f
je 0x40bbfd
cmp ecx, ebx
jne 0x40bbe6
jmp 0x40bc23
sub ecx, ebx
sar ecx, 1
js 0x40bc23
lea eax, [edi - 1]
cmp ecx, eax
jne 0x40bc23
cmp edi, 1
jne 0x40bc18
mov byte [ebp - 0xd], 1
jmp 0x40bdea
mov edi, eax
xor ecx, ecx
mov dword [ebp - 0x1c], edi
mov word [ebx + eax*2], cx
xor ecx, ecx
lea esi, [edi + 1]
mov eax, esi
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0044108a
add esp, 4
lea ecx, [esi + esi]
push ecx
push ebx
push eax
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x28], edi
mov dword [ebp - 0x24], edi
call fcn.00445a90
add esp, 0xc
mov ecx, ebx
mov byte [ebp - 4], 1
call fcn.0040b990
test al, al
jne 0x40bddb
jmp 0x40bc70
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x40bc99
lea esi, [ebx + edi*2]
cmp esi, ebx
je 0x40bc99
movzx eax, word [esi - 2]
sub esi, 2
cmp eax, 0x5c
je 0x40bca2
cmp eax, 0x2f
je 0x40bca2
cmp esi, ebx
jne 0x40bc84
mov byte [ebp - 0xd], 0
jmp 0x40bddf
sub esi, ebx
sar esi, 1
js 0x40bc99
test esi, esi
je 0x40bc99
cmp esi, 1
jne 0x40bcbe
movzx eax, word [ebx]
cmp eax, 0x5c
je 0x40bc99
cmp eax, 0x2f
je 0x40bc99
lea eax, [esi + 1]
cmp dword [ebp - 0x14], eax
jae 0x40bc99
cmp esi, edi
jae 0x40bcd5
mov edi, esi
xor eax, eax
mov dword [ebp - 0x1c], edi
mov word [ebx + esi*2], ax
mov ecx, ebx
call fcn.0040b990
test al, al
je 0x40bc70
mov edi, dword [ebp - 0x28]
cmp esi, edi
jge 0x40bddb
jmp 0x40bcf0
mov edx, dword [ebp - 0x2c]
add edx, 2
movzx eax, word [edx + esi*2]
lea edx, [edx + esi*2]
mov ecx, edx
test ax, ax
je 0x40bd24
cmp ax, 0x5c
je 0x40bdb0
cmp ax, 0x2f
je 0x40bdb0
movzx eax, word [ecx + 2]
add ecx, 2
test ax, ax
jne 0x40bd04
mov esi, edi
cmp esi, dword [ebp - 0x18]
jbe 0x40bd5d
xor ecx, ecx
lea eax, [esi + 1]
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0044108a
add esp, 4
mov edi, eax
push ebx
call fcn.004411c8
mov ebx, edi
mov edi, dword [ebp - 0x28]
add esp, 4
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x18], esi
test esi, esi
je 0x40bd71
lea eax, [esi + esi]
push eax
push dword [ebp - 0x2c]
push ebx
call fcn.00445a90
add esp, 0xc
xor eax, eax
mov word [ebx + esi*2], ax
mov dword [ebp - 0x1c], esi
cmp byte [0x45c151], al
jne 0x40bdc2
mov edx, ebx
lea ecx, [ebp - 0x38]
call fcn.004096f0
push 0
push dword [eax]
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
push dword [ebp - 0x38]
mov edi, eax
call fcn.004411c8
add esp, 4
test edi, edi
je 0x40bc99
mov edi, dword [ebp - 0x28]
jmp 0x40bdd3
sub ecx, edx
sar ecx, 1
js 0x40bd24
inc esi
add esi, ecx
jmp 0x40bd26
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
je 0x40bc99
cmp esi, edi
jl 0x40bcf0
mov byte [ebp - 0xd], 1
push dword [ebp - 0x2c]
call fcn.004411c8
add esp, 4
push ebx
call fcn.004411c8
mov al, byte [ebp - 0xd]
add esp, 4
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret