Function at 0x408310
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x48201a
mov eax, dword fs:[0]
push eax
sub esp, 0x248
mov eax, dword [0x4c0e0c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
lea ecx, [ebp - 0x250]
mov dword [ebp - 0x234], 0
call dword [sym.imp.mfc140.dll_Ordinal_316]
lea eax, [ebx + 0x308]
mov dword [ebp - 4], 0
push eax
lea ecx, [ebp - 0x24c]
call dword [sym.imp.mfc140.dll_Ordinal_300]
lea ecx, [ebx + 0x2ec]
mov byte [ebp - 4], 1
push str.Desktop_Printer
call dword [sym.imp.mfc140.dll_Ordinal_2986]
lea ecx, [ebp - 0x250]
test eax, eax
jne 0x4083a0
push str.System_Default
call dword [sym.imp.mfc140.dll_Ordinal_1529]
lea ecx, [ebp - 0x24c]
lea eax, [ebx + 0x2f0]
push eax
call dword [sym.imp.mfc140.dll_Ordinal_1526]
lea ecx, [ebp - 0x248]
mov dword [ebp - 0x244], 0
call dword [sym.imp.FSUTIL.dll_public:_void___thiscall_AString::constructor_void_]
mov byte [ebp - 4], 2
call dword [sym.imp.PMCORE.dll_GetSetupDatabase]
mov edi, dword [sym.imp.FSUTIL.dll_public:_void___thiscall_AString::destructor_void_]
mov dword [ebp - 0x254], eax
test eax, eax
jne 0x4083e4
xor esi, esi
jmp 0x408848
mov ecx, eax
call dword [sym.imp.PMCORE.dll_public:_class_ASetup____thiscall_ASetupDatabase::GetSetupHead_void_]
push str.Limit_Num_Of_Setups
lea ecx, [ebp - 0x238]
mov esi, eax
call dword [sym.imp.FSUTIL.dll_public:_void___thiscall_AString::constructor_char_const__]
push 0
mov byte [ebp - 4], 3
mov dword [ebp - 0x234], 1
call fcn.00477270
add esp, 4
lea ecx, [ebp - 0x244]
mov edx, dword [eax]
push ecx
lea ecx, [ebp - 0x238]
push ecx
mov ecx, eax
call dword [edx + 0x1c]
test eax, eax
je 0x408440
cmp dword [ebp - 0x244], 1
mov byte [ebp - 0x239], 1
je 0x408447
mov byte [ebp - 0x239], 0
lea ecx, [ebp - 0x238]
mov dword [ebp - 4], 2
call edi
cmp byte [ebp - 0x239], 0
je 0x40848f
test esi, esi
je 0x40848f
lea eax, [ebp - 0x234]
mov ecx, esi
push eax
call dword [sym.imp.PMCORE.dll_public:_class_AString___thiscall_ASetup::GetSetupName_void_]
push eax
lea ecx, [ebp - 0x248]
mov byte [ebp - 4], 4
call dword [0x48f52c]
lea ecx, [ebp - 0x234]
mov byte [ebp - 4], 2
call edi
push 0
push 0x80
push 3
push 0
push 3
push SysReAllocString
lea ecx, [ebx + 0x2fc]
call dword [sym.imp.mfc140.dll_Ordinal_1661]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
jne 0x4084ce
push 0
lea ecx, [ebx + 0x2fc]
call dword [sym.imp.mfc140.dll_Ordinal_1661]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
lea ecx, [ebp - 0x230]
call dword [sym.imp.PMCORE.dll_public:_void___thiscall_ASetupCommonRec::constructor_void_]
lea eax, [ebx + 0x2f8]
mov byte [ebp - 4], 5
mov ecx, eax
mov dword [ebp - 0x234], eax
call dword [sym.imp.mfc140.dll_Ordinal_1661]
mov esi, dword [reloc.FSUTIL.dll___4AString__QAEABV0_PBD_Z]
lea ecx, [ebp - 0x140]
push eax
call esi
lea ecx, [ebx + 0x2ec]
call dword [sym.imp.mfc140.dll_Ordinal_1661]
push eax
lea ecx, [ebp - 0x13c]
call esi
lea ecx, [ebp - 0x250]
call dword [sym.imp.mfc140.dll_Ordinal_1661]
push eax
lea ecx, [ebp - 0x138]
call esi
lea ecx, [ebp - 0x24c]
call dword [sym.imp.mfc140.dll_Ordinal_1661]
push eax
lea ecx, [ebp - 0x130]
call esi
push ecx
lea eax, [ebx + 0x2fc]
mov ecx, esp
push eax
call dword [sym.imp.mfc140.dll_Ordinal_300]
lea ecx, [ebp - 0x22c]
call dword [sym.imp.FSUTIL.dll_public:_class_AFilePath____thiscall_AFilePath::operator_class_ATL::CStringT_char__class_StrTraitMFC_DLL_char__class_ATL::ChTraitsCRT_char____]
lea ecx, [ebx + 0x300]
call dword [sym.imp.mfc140.dll_Ordinal_1661]
push eax
lea ecx, [ebp - 0x128]
call esi
lea ecx, [ebx + 0x2ec]
call dword [sym.imp.mfc140.dll_Ordinal_1661]
mov esi, dword [sym.imp.FSUTIL.dll_public:_void___thiscall_AString::constructor_char_const__]
lea ecx, [ebp - 0x238]
push eax
call esi
lea eax, [ebp - 0x238]
mov byte [ebp - 4], 6
push eax
call dword [sym.imp.PMCORE.dll_PmPrinterNeedsPort]
add esp, 4
test eax, eax
je 0x4085ba
mov ecx, dword [ebx + 0x38c]
test ecx, ecx
je 0x4085ba
lea eax, [ebp - 0x230]
push eax
call fcn.004065e0
lea ecx, [ebp - 0x238]
mov byte [ebp - 4], 5
call edi
lea eax, [ebp - 0x230]
push eax
call dword [sym.imp.PMCORE.dll_PMAddSetup]
add esp, 4
test eax, eax
jne 0x4085f0
push eax
push 0x9c41
call dword [sym.imp.FSUTIL.dll_int___cdecl_FSMessageBox_unsigned_int__unsigned_int_]
add esp, 8
xor esi, esi
jmp 0x40883c
push str.Desktop_Printer
lea ecx, [ebx + 0x2ec]
call dword [sym.imp.mfc140.dll_Ordinal_2986]
test eax, eax
jne 0x40860c
push 0x490e40
jmp 0x408619
lea ecx, [ebp - 0x24c]
call dword [sym.imp.mfc140.dll_Ordinal_1661]
push eax
lea ecx, [ebp - 0x238]
call esi
lea eax, [ebp - 0x238]
push eax
call dword [sym.imp.PMCORE.dll_PMCheckPort]
add esp, 4
mov dword [ebp - 0x240], eax
lea ecx, [ebp - 0x238]
call edi
lea ecx, [ebx + 0x2f8]
call dword [sym.imp.mfc140.dll_Ordinal_1661]
push eax
lea ecx, [ebp - 0x238]
call esi
mov ecx, dword [ebp - 0x254]
push eax
mov byte [ebp - 4], 7
call dword [sym.imp.PMCORE.dll_public:_class_ASetup____thiscall_ASetupDatabase::GetSetup_class_AString_const__]
lea ecx, [ebp - 0x238]
mov byte [ebp - 4], 5
mov ebx, eax
call edi
test ebx, ebx
jne 0x40867e
xor esi, esi
jmp 0x40883c
cmp dword [ebp - 0x240], 1
jne 0x4086c3
mov esi, dword [sym.imp.PMCORE.dll_public:_struct_ASetupCommonRec____thiscall_ASetup::GetCommonRec_void_]
mov ecx, ebx
call esi
mov ecx, dword [ebp - 0xf4]
mov dword [eax + 0x13c], ecx
mov ecx, ebx
call esi
mov ecx, dword [ebp - 0xf0]
mov dword [eax + 0x140], ecx
mov ecx, ebx
call esi
mov ecx, dword [ebp - 0xec]
mov esi, dword [sym.imp.FSUTIL.dll_public:_void___thiscall_AString::constructor_char_const__]
mov dword [eax + 0x144], ecx
call sub.mfc140.dll_Ordinal_2241
mov ecx, dword [ebp - 0x234]
call dword [sym.imp.mfc140.dll_Ordinal_1661]
push eax
lea ecx, [ebp - 0x240]
call esi
push eax
call dword [sym.imp.PMCORE.dll_PMSetActiveSetup]
add esp, 4
lea ecx, [ebp - 0x240]
test eax, eax
sete bl
call edi
test bl, bl
je 0x40871f
mov ecx, dword [ebp - 0x234]
call dword [sym.imp.mfc140.dll_Ordinal_1661]
push eax
lea ecx, [ebp - 0x234]
call esi
push eax
call dword [sym.imp.PMCORE.dll_PMDisableActiveSetup]
add esp, 4
lea ecx, [ebp - 0x234]
call edi
push str.Limit_Num_Of_Setups
lea ecx, [ebp - 0x240]
call esi
push 0
mov byte [ebp - 4], 8
mov dword [ebp - 0x234], 2
call fcn.00477270
add esp, 4
lea ecx, [ebp - 0x244]
mov edx, dword [eax]
push ecx
lea ecx, [ebp - 0x240]
push ecx
mov ecx, eax
call dword [edx + 0x1c]
test eax, eax
je 0x40876a
cmp dword [ebp - 0x244], 1
jne 0x40876a
mov bl, 1
jmp 0x40876c
xor bl, bl
lea ecx, [ebp - 0x240]
mov dword [ebp - 4], 5
call edi
test bl, bl
je 0x408837
mov ecx, dword [ebp - 0x254]
lea eax, [ebp - 0x248]
push eax
call dword [sym.imp.PMCORE.dll_public:_class_ASetup____thiscall_ASetupDatabase::GetSetup_class_AString_const__]
mov ebx, eax
test ebx, ebx
je 0x408837
mov ecx, ebx
call dword [sym.imp.PMCORE.dll_public:_int___thiscall_ASetup::GetSetupStatus_void_]
test al, 2
je 0x4087c9
call dword [sym.imp.PMCORE.dll_GetJobDatabase]
test eax, eax
je 0x4087bd
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0x38]
push 1
push 0x10
mov ecx, ebx
call dword [sym.imp.PMCORE.dll_public:_void___thiscall_ASetup::SetSetupStatus_int__int_]
push dword [ebp - 0x248]
lea ecx, [ebp - 0x234]
call esi
lea eax, [ebp - 0x234]
push eax
call dword [sym.imp.PMCORE.dll_PMDeleteSetup]
add esp, 4
lea ecx, [ebp - 0x234]
test eax, eax
sete bl
call edi
test bl, bl
je 0x40880a
push 0
push 0xafc9
call dword [sym.imp.FSUTIL.dll_int___cdecl_FSMessageBox_unsigned_int__unsigned_int_]
add esp, 8
jmp 0x408837
mov ecx, dword [ebp - 0x254]
call dword [sym.imp.PMCORE.dll_public:_class_ASetup____thiscall_ASetupDatabase::GetSetupHead_void_]
lea ecx, [ebp - 0x234]
push ecx
mov ecx, eax
call dword [sym.imp.PMCORE.dll_public:_class_AString___thiscall_ASetup::GetSetupName_void_]
push eax
call dword [sym.imp.PMCORE.dll_PMSetActiveSetup]
add esp, 4
lea ecx, [ebp - 0x234]
call edi
mov esi, 1
lea ecx, [ebp - 0x230]
call dword [sym.imp.PMCORE.dll_public:_void___thiscall_ASetupCommonRec::destructor_void_]
lea ecx, [ebp - 0x248]
call edi
lea ecx, [ebp - 0x24c]
call dword [sym.imp.mfc140.dll_Ordinal_1044]
lea ecx, [ebp - 0x250]
call dword [sym.imp.mfc140.dll_Ordinal_1044]
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0047ff18
mov esp, ebp
pop ebp
ret