Function at 0x4002af4
Capabilities:
Set current directory

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x840
mov eax, dword [0x400a058]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, dword [ebp + 0xc]
push edi
xor eax, eax
push 0x206
mov word [ebp - 0x414], ax
xor edi, edi
lea eax, [ebp - 0x412]
push edi
push eax
mov dword [ebp - 0x828], ebx
call sub.msvcrt.dll_memset
xor eax, eax
push 0x1fe
mov word [ebp - 0x614], ax
lea eax, [ebp - 0x612]
push edi
push eax
call sub.msvcrt.dll_memset
mov dword [ebp - 0x840], edi
xor eax, eax
lea edi, [ebp - 0x83c]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
xor edi, edi
add esp, 0x18
mov dword [ebp - 0x824], edi
cmp ebx, edi
je 0x4002b76
cmp esi, edi
jne 0x4002b81
mov dword [ebp - 0x820], edi
jmp 0x4002dae
mov ebx, dword [ebx + 0x10]
mov dword [ebp - 0x820], edi
jmp 0x4002b9e
push esi
push dword [ebx]
call dword [sym.imp.msvcrt.dll_wcsstr]
pop ecx
pop ecx
test eax, eax
jne 0x4002ba7
mov ebx, dword [ebx + 4]
cmp ebx, edi
jne 0x4002b8c
jmp 0x4002dae
push 0x5c
push dword [ebx]
call dword [sym.imp.msvcrt.dll_wcsrchr]
mov edi, eax
pop ecx
pop ecx
test edi, edi
je 0x4002dae
lea eax, [edi + 2]
push eax
mov esi, 0x104
push esi
lea eax, [ebp - 0x414]
push eax
call fcn.04001ea1
mov eax, dword [ebx]
sub edi, eax
inc edi
inc edi
sar edi, 1
push edi
push eax
push 0x100
lea eax, [ebp - 0x614]
push eax
call fcn.04001f16
cmp dword [ebp + 0x10], 0
je 0x4002c51
lea eax, [ebp - 0x414]
mov dword [ebp - 0x838], eax
mov eax, dword [ebx]
mov dword [ebp - 0x840], eax
lea eax, [ebp - 0x614]
lea edi, [ebp - 0x840]
mov dword [ebp - 0x83c], eax
call fcn.04001c32
mov dword [ebp - 0x824], eax
test eax, eax
je 0x4002d96
call fcn.04001d9a
mov dword [ebp - 0x834], eax
test eax, eax
je 0x4002d62
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
test eax, eax
je 0x4002d62
jmp 0x4002c57
mov edi, dword [ebp - 0x828]
lea eax, [ebp - 0x414]
push eax
lea eax, [ebp - 0x614]
push eax
push edi
call fcn.0400296c
cmp dword [ebp + 0x10], 0
mov dword [ebp - 0x820], eax
je 0x4002dae
test eax, eax
je 0x4002d62
xor eax, eax
mov ebx, 0x206
push ebx
push eax
mov word [ebp - 0x20c], ax
lea eax, [ebp - 0x20a]
push eax
call sub.msvcrt.dll_memset
xor eax, eax
push ebx
mov word [ebp - 0x81c], ax
xor ebx, ebx
lea eax, [ebp - 0x81a]
push ebx
push eax
call sub.msvcrt.dll_memset
add esp, 0x18
push dword [ebp - 0x834]
lea eax, [ebp - 0x20c]
push esi
push eax
mov dword [ebp - 0x828], esi
call fcn.04001ea1
push 0x4001174
push esi
lea eax, [ebp - 0x20c]
push eax
call fcn.04001f65
lea eax, [ebp - 0x414]
push eax
push esi
lea eax, [ebp - 0x20c]
push eax
call fcn.04001f65
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.msvcrt.dll__wcslwr]
lea eax, [ebp - 0x20c]
mov dword [esp], 0x4001198
push eax
call dword [sym.imp.msvcrt.dll_wcsstr]
mov esi, eax
xor eax, eax
pop ecx
pop ecx
cmp esi, eax
je 0x4002d30
add esi, 8
movzx ebx, word [esi]
xor ecx, ecx
mov word [esi], cx
lea ecx, [ebp - 0x828]
push ecx
lea ecx, [ebp - 0x81c]
push ecx
push eax
push eax
push eax
lea ecx, [ebp - 0x20c]
push ecx
push eax
call sub.WINSPOOL.DRV_UploadPrinterDriverPackageW
xor ecx, ecx
test eax, eax
setge cl
mov dword [ebp - 0x820], ecx
test esi, esi
je 0x4002d62
mov word [esi], bx
cmp dword [ebp - 0x824], 0
je 0x4002d96
cmp dword [ebp - 0x820], 0
je 0x4002d8a
push dword [ebp - 0x824]
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
test eax, eax
jne 0x4002d8a
and dword [ebp - 0x820], eax
push dword [ebp - 0x824]
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, dword [edi + 0xc]
test eax, eax
je 0x4002dae
push 6
push eax
call fcn.04002062
push dword [edi + 0xc]
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x820]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0400347f
leave
ret 0xc