Function at 0x408c5a
Capabilities:
Create directory
Delete file

Disassembly:
mov eax, 0x40eb84
call fcn.0040dca0
sub esp, 0x7d0
push ebx
push esi
push edi
mov esi, 0x415b20
push dword [ebp + 8]
mov dword [ebp - 0x30], ecx
push str.InstallResPkg:_SrcPkg_s
push esi
call fcn.00409d3d
add esp, 0xc
push dword [ebp + 0xc]
push str._______________DestClientDir_s
push esi
call fcn.00409d3d
add esp, 0xc
push dword [ebp + 0x10]
push str._______________ResID_d
push esi
call fcn.00409d3d
and byte [ebp - 0x6d8], 0
add esp, 0xc
xor eax, eax
lea edi, [ebp - 0x6d7]
push 0x40
mov esi, dword [sym.imp.MSVCRT.dll__snprintf]
pop ecx
mov ebx, 0x103
push dword [ebp + 0x10]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push str.ResPackage
push dword [ebp + 0xc]
stosb byte es:[edi], al
push str._s__s__d.pkg
lea eax, [ebp - 0x6d8]
push ebx
push eax
call esi
and byte [ebp - 0x5d4], 0
add esp, 0x18
xor eax, eax
lea edi, [ebp - 0x5d3]
push 0x40
pop ecx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push str.ResPackage
push dword [ebp + 0xc]
stosb byte es:[edi], al
push str._s__s
lea eax, [ebp - 0x5d4]
push ebx
push eax
call esi
lea eax, [ebp - 0x5d4]
push 0
push eax
call dword [sym.imp.MSVCRT.dll__access]
add esp, 0x1c
cmp eax, 0xffffffff
jne 0x408d3a
lea eax, [ebp - 0x5d4]
push eax
call dword [sym.imp.MSVCRT.dll__mkdir]
pop ecx
push dword [ebp + 8]
mov ecx, dword [ebp - 0x30]
lea eax, [ebp - 0x6d8]
push eax
call fcn.00409235
test al, al
jne 0x408d69
push dword [ebp + 8]
lea eax, [ebp - 0x6d8]
push eax
call fcn.0040ab28
pop ecx
test al, al
pop ecx
je 0x409176
and byte [ebp - 0x3cc], 0
push 0x40
pop ecx
xor eax, eax
lea edi, [ebp - 0x3cb]
push dword [ebp + 0x10]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
push str._d.pkg
lea eax, [ebp - 0x3cc]
push ebx
push eax
call esi
and byte [ebp - 0x1c4], 0
add esp, 0x10
xor eax, eax
lea edi, [ebp - 0x1c3]
push 0x40
pop ecx
rep stosd dword es:[edi], eax
push str.ResPackage.cfg
push str.ResPackage
push dword [ebp + 0xc]
stosw word es:[edi], ax
stosb byte es:[edi], al
push str._s__s__s
lea eax, [ebp - 0x1c4]
push ebx
push eax
call esi
and byte [ebp - 0x7dc], 0
add esp, 0x18
xor eax, eax
lea edi, [ebp - 0x7db]
push 0x40
pop ecx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [ebp - 0x1c4]
push eax
push str._s.new
lea eax, [ebp - 0x7dc]
push ebx
push eax
call esi
and byte [ebp - 0x4d0], 0
add esp, 0x10
xor eax, eax
lea edi, [ebp - 0x4cf]
push 0x40
pop ecx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [ebp - 0x1c4]
push eax
push str._s.tmp
lea eax, [ebp - 0x4d0]
push ebx
push eax
call esi
xor esi, esi
lea eax, [ebp - 0x1c4]
push esi
push eax
call dword [sym.imp.MSVCRT.dll__access]
add esp, 0x18
cmp eax, 0xffffffff
jne 0x408e7b
lea eax, [ebp - 0x1c4]
push 0x412c90
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
mov edi, eax
pop ecx
cmp edi, esi
pop ecx
je 0x409176
lea eax, [ebp - 0x3cc]
push eax
push edi
call dword [sym.imp.MSVCRT.dll_fprintf]
push edi
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 0xc
jmp 0x4090a8
mov al, byte [ebp + 0xf]
mov dword [ebp - 0x18], esi
mov byte [ebp - 0x1c], al
mov dword [ebp - 0x14], esi
mov dword [ebp - 0x10], esi
push 0x3f
push 0x4134c4
lea ecx, [ebp + 8]
mov dword [ebp - 4], esi
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::locale::constructor_char_const___int_]
push eax
lea eax, [ebp + 0xc]
push eax
mov byte [ebp - 4], 1
call dword [sym.imp.MSVCP60.dll_public:_static_class_std::locale___cdecl_std::locale::global_class_std::locale_const__]
pop ecx
pop ecx
lea ecx, [ebp + 0xc]
mov byte [ebp - 4], 1
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::locale::destructor_void_]
and byte [ebp - 4], 0
lea ecx, [ebp + 8]
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::locale::destructor_void_]
push 1
lea ecx, [ebp - 0xc0]
pop ebx
push ebx
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::basic_ifstream_char__struct_std::char_traits_char__::constructor_void_]
lea eax, [ebp - 0x1c4]
push ebx
push eax
lea ecx, [ebp - 0xc0]
mov byte [ebp - 4], 3
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::basic_ifstream_char__struct_std::char_traits_char__::open_char_const___int_]
mov eax, dword [ebp - 0xc0]
lea edx, [eax + 4]
mov eax, dword [eax + 4]
mov eax, dword [ebp + eax - 0xbc]
test al, 6
jne 0x40915a
test bl, al
jne 0x408fe9
and byte [ebp - 0x2c8], 0
push 0x40
pop ecx
xor eax, eax
lea edi, [ebp - 0x2c7]
push 0xa
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, dword [edx]
lea ecx, [ebp + eax - 0xc0]
call dword [sym.imp.MSVCP60.dll_public:_char___thiscall_std::basic_ios_char__struct_std::char_traits_char__::widen_char_const]
push eax
lea eax, [ebp - 0x2c8]
push 0x104
push eax
lea ecx, [ebp - 0xc0]
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_istream_char__struct_std::char_traits_char______thiscall_std::basic_istream_char__struct_std::char_traits_char__::getline_char___int__char_]
lea eax, [ebp - 0x2c8]
push eax
lea eax, [ebp - 0x3cc]
push eax
call dword [sym.imp.MSVCRT.dll__stricmp]
pop ecx
test eax, eax
pop ecx
je 0x409077
lea eax, [ebp - 0x2c8]
push eax
call sub.MSVCRT.dll_strlen
test eax, eax
pop ecx
jbe 0x408fcf
mov al, byte [ebp + 0xf]
push esi
lea ecx, [ebp - 0x2c]
mov byte [ebp - 0x2c], al
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
lea eax, [ebp - 0x2c8]
push eax
call sub.MSVCRT.dll_strlen
pop ecx
push eax
lea eax, [ebp - 0x2c8]
push eax
lea ecx, [ebp - 0x2c]
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::assign_char_const___unsigned_int_]
lea eax, [ebp - 0x2c]
lea ecx, [ebp - 0x1c]
push eax
mov byte [ebp - 4], 4
call fcn.00409730
push ebx
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 3
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
mov eax, dword [ebp - 0xc0]
lea edx, [eax + 4]
mov eax, dword [eax + 4]
test byte [ebp + eax - 0xbc], 1
je 0x408f13
lea ecx, [ebp - 0xc0]
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::basic_ifstream_char__struct_std::char_traits_char__::close_void_]
mov al, byte [ebp + 0xf]
push esi
lea ecx, [ebp - 0x2c]
mov byte [ebp - 0x2c], al
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
lea eax, [ebp - 0x3cc]
push eax
call sub.MSVCRT.dll_strlen
pop ecx
push eax
lea eax, [ebp - 0x3cc]
push eax
lea ecx, [ebp - 0x2c]
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::assign_char_const___unsigned_int_]
lea eax, [ebp - 0x2c]
lea ecx, [ebp - 0x1c]
push eax
mov byte [ebp - 4], 5
call fcn.00409730
push ebx
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 3
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
lea eax, [ebp - 0x7dc]
push 0x412c90
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
pop ecx
cmp eax, esi
pop ecx
mov dword [ebp + 0xc], eax
jne 0x4090af
and byte [ebp - 4], 0
lea ecx, [ebp - 0x64]
call dword [sym.imp.MSVCP60.dll_public_virtual:_void___thiscall_std::basic_ifstream_char__struct_std::char_traits_char__::destructor_void_]
lea ecx, [ebp - 0x64]
call dword [sym.imp.MSVCP60.dll_public_virtual:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::destructor_void_]
jmp 0x40916a
push dword [ebp + 0x10]
push str.InstallResPkg:_respkg
push 0x415b20
call fcn.00409d3d
add esp, 0xc
and byte [ebp - 4], 0
lea ecx, [ebp - 0xc0]
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::basic_ifstream_char__struct_std::char_traits_char__::vbase_dtor_void_]
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x1c]
call fcn.004096fa
mov al, 1
jmp 0x409178
xor ebx, ebx
xor edi, edi
mov eax, dword [ebp - 0x18]
cmp eax, esi
je 0x4090ec
mov ecx, dword [ebp - 0x14]
sub ecx, eax
sar ecx, 4
cmp ebx, ecx
jae 0x4090ec
add eax, edi
mov eax, dword [eax + 4]
cmp eax, esi
jne 0x4090d4
mov eax, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
push eax
push 0x412c60
push dword [ebp + 0xc]
call dword [sym.imp.MSVCRT.dll_fprintf]
add esp, 0xc
inc ebx
add edi, 0x10
jmp 0x4090b3
push dword [ebp + 0xc]
call dword [sym.imp.MSVCRT.dll_fclose]
mov esi, dword [sym.imp.KERNEL32.dll_DeleteFileA]
pop ecx
lea eax, [ebp - 0x4d0]
push eax
call esi
lea eax, [ebp - 0x4d0]
push eax
lea eax, [ebp - 0x1c4]
push eax
call fcn.0040af2d
pop ecx
test eax, eax
pop ecx
je 0x40915a
lea eax, [ebp - 0x1c4]
push eax
lea eax, [ebp - 0x7dc]
push eax
call fcn.0040af2d
pop ecx
test eax, eax
pop ecx
je 0x409145
lea eax, [ebp - 0x4d0]
push eax
call esi
jmp 0x40908c
lea eax, [ebp - 0x1c4]
push eax
lea eax, [ebp - 0x4d0]
push eax
call fcn.0040af2d
pop ecx
pop ecx
and byte [ebp - 4], 0
lea ecx, [ebp - 0xc0]
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::basic_ifstream_char__struct_std::char_traits_char__::vbase_dtor_void_]
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x1c]
call fcn.004096fa
xor al, al
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 0xc