Function at 0x4036a0
Capabilities:
Extract resource via kernel32 functions
Get common file path
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x254
mov eax, dword [0x40e090]
mov dword [esp + 0x250], eax
xor eax, eax
mov dword [esp + 0x1d], eax
mov dword [esp + 0x21], eax
mov dword [esp + 0x25], eax
mov dword [esp + 0x29], eax
mov dword [esp + 0x2d], eax
mov dword [esp + 0x31], eax
mov dword [esp + 0x35], eax
mov word [esp + 0x39], ax
push ebx
mov byte [esp + 0x40], al
mov byte [esp + 0x3f], al
push esi
push edi
mov ecx, 0x40
lea edi, [esp + 0x49]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
xor eax, eax
mov byte [esp + 0x150], 0
mov ecx, 0x40
lea edi, [esp + 0x151]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, dword [ebp + 8]
test eax, eax
mov dword [esp + 0x14], 0x80004005
mov byte [esp + 0x28], 0
mov dword [esp + 0x1c], 0
je 0x4039ea
mov esi, dword [sym.imp.KERNEL32.dll_FindResourceA]
push 0xa
push 0x40b8b8
push 0
call esi
push 0xa
push 0x40b8b4
push 0
mov edi, eax
call esi
push 0xa
push 0x40b8b0
push 0
mov ebx, eax
call esi
test edi, edi
mov dword [esp + 0x10], eax
je 0x403a2c
test ebx, ebx
je 0x403a2c
test eax, eax
je 0x403a2c
mov esi, dword [sym.imp.KERNEL32.dll_SizeofResource]
push edi
push 0
call esi
push ebx
push 0
mov dword [esp + 0x28], eax
call esi
mov ecx, dword [esp + 0x10]
push ecx
push 0
mov dword [esp + 0x20], eax
call esi
mov esi, dword [sym.imp.KERNEL32.dll_LoadResource]
push edi
push 0
mov dword [esp + 0x2c], eax
call esi
push ebx
push 0
mov edi, eax
call esi
mov edx, dword [esp + 0x10]
push edx
push 0
mov ebx, eax
call esi
mov esi, dword [sym.imp.KERNEL32.dll_LockResource]
push edi
mov dword [esp + 0x14], eax
call esi
push ebx
mov edi, eax
call esi
mov ebx, eax
mov eax, dword [esp + 0x10]
push eax
call esi
test edi, edi
mov esi, eax
je 0x403a01
mov eax, dword [esp + 0x20]
test eax, eax
jbe 0x403a01
test ebx, ebx
je 0x403a01
mov eax, dword [esp + 0x18]
test eax, eax
jbe 0x403a01
test esi, esi
je 0x403a01
mov edi, dword [esp + 0x24]
test edi, edi
jbe 0x403a01
push eax
push ebx
call fcn.00403670
add esp, 8
test eax, eax
jne 0x403849
push 0x30
push str.Error
push str.Encrypt_File_Failed_
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x25c]
call fcn.00403bb5
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [esp + 0x18]
push ecx
push ebx
push 0
call fcn.00403530
push eax
lea edx, [esp + 0x38]
push 0x40b894
push edx
call fcn.00404ace
push edi
lea eax, [esp + 0x44]
push eax
push esi
call fcn.00404bec
add esp, 0x24
test eax, eax
je 0x4038c2
push 0x30
push str.Error
push esi
mov esi, dword [sym.imp.USER32.dll_MessageBoxA]
push 0
call esi
push 0x30
push str.Error
lea ecx, [esp + 0x30]
push ecx
push 0
call esi
push 0x30
push str.Error
push str.Check_sum_failed_
push 0
call esi
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x25c]
call fcn.00403bb5
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea edx, [esp + 0x150]
push edx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
test eax, eax
jne 0x403903
push 0x30
push str.Error
push str.GetTempPath_failed_
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x25c]
call fcn.00403bb5
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea eax, [esp + 0x48]
push eax
push 0
push 0x40b868
lea ecx, [esp + 0x15c]
push ecx
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
test eax, eax
jne 0x40394b
push 0x30
push str.Error
push str.GetTempFileName_failed_
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x25c]
call fcn.00403bb5
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea eax, [esp + 0x48]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x403952
sub eax, edx
cmp eax, 4
jl 0x4039ea
push 0
push 0xa0
push 2
push 0
push 1
lea eax, [esp + eax + 0x5c]
mov cl, 0x45
push 0x40000000
lea edx, [esp + 0x60]
push edx
mov byte [eax - 4], 0x2e
mov byte [eax - 3], cl
mov byte [eax - 2], 0x58
mov byte [eax - 1], cl
mov dword [esp + 0x30], 1
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
test esi, esi
je 0x4039ea
cmp esi, 0xffffffff
je 0x4039e3
mov edi, dword [esp + 0x18]
push 0
lea eax, [esp + 0x20]
push eax
push edi
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4039e3
cmp dword [esp + 0x1c], edi
jne 0x4039e3
mov ecx, dword [ebp + 0xc]
mov eax, dword [ebp + 8]
push ecx
lea edx, [esp + 0x4c]
push edx
push eax
call fcn.0040400d
add esp, 0xc
mov dword [esp + 0x14], 0
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x25c]
call fcn.00403bb5
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0x30
push str.Error
push str.One_Resource_is_NULL_
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x25c]
call fcn.00403bb5
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0x30
push str.Error
push 0x40b820
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
mov ecx, dword [esp + 0x25c]
mov eax, dword [esp + 0x14]
call fcn.00403bb5
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret