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

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff0
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
sub esp, 0x508
mov eax, dword [0x429040]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push edi
lea eax, [ebp - 0x418]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
cmp eax, 0x104
ja 0x402255
test eax, eax
je 0x402255
push 0x41
call dword [sym.imp.USER32.dll_CharLowerW]
movzx edx, ax
mov ecx, 0x4240dc
lea eax, [ebp - 0x4c0]
push eax
call fcn.00402340
add esp, 4
movups xmm0, xmmword [eax]
movups xmmword [ebp - 0x450], xmm0
movq xmm0, qword [eax + 0x10]
movq qword [ebp - 0x440], xmm0
mov eax, dword [eax + 0x18]
mov dword [ebp - 0x438], eax
lea eax, [ebp - 0x210]
push eax
push 0
lea eax, [ebp - 0x450]
push eax
lea eax, [ebp - 0x418]
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
test eax, eax
jne 0x401d27
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov eax, dword [sym.imp.USER32.dll_CharLowerW]
push 0x41
call eax
movzx edx, ax
mov ecx, 0x4240a0
lea eax, [ebp - 0x4e0]
push eax
call fcn.004023b0
add esp, 4
movups xmm0, xmmword [eax]
push esi
movups xmmword [ebp - 0x470], xmm0
movups xmm0, xmmword [eax + 0x10]
movups xmmword [ebp - 0x460], xmm0
movups xmm0, xmmword [eax + 0x20]
movups xmmword [ebp - 0x450], xmm0
movq xmm0, qword [eax + 0x30]
movq qword [ebp - 0x440], xmm0
mov eax, dword [eax + 0x38]
mov dword [ebp - 0x438], eax
lea eax, [ebp - 0x470]
jmp 0x40230e
push pe_nt_image_headers32
push 0x71
push 0x400000
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov esi, eax
test esi, esi
je 0x4021e0
push esi
push 0x400000
call dword [sym.imp.KERNEL32.dll_LoadResource]
push esi
push 0x400000
mov edi, eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov dword [ebp - 0x42c], eax
test edi, edi
je 0x4021e0
push edi
call dword [sym.imp.KERNEL32.dll_LockResource]
mov dword [ebp - 0x424], eax
test eax, eax
je 0x4021e0
mov edi, dword [sym.imp.USER32.dll_CharLowerW]
push 0x41
call edi
movzx edx, ax
mov ecx, 0x424054
lea eax, [ebp - 0x4b0]
push eax
call fcn.00402420
add esp, 4
movq xmm0, qword [eax]
movq qword [ebp - 0x49c], xmm0
mov ax, word [eax + 8]
mov word [ebp - 0x494], ax
lea eax, [ebp - 0x49c]
push eax
lea eax, [ebp - 0x210]
push 0x104
push eax
call fcn.0041133c
add esp, 0xc
lea eax, [ebp - 0x210]
xor esi, esi
mov dword [ebp - 0x428], esi
push esi
push 0x80
push 2
push esi
push 7
push 2
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x420], eax
cmp eax, 0xffffffff
je 0x401e4f
push esi
lea ecx, [ebp - 0x41c]
mov dword [ebp - 0x41c], esi
push ecx
push dword [ebp - 0x42c]
push dword [ebp - 0x424]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x401e33
mov eax, dword [ebp - 0x42c]
cmp dword [ebp - 0x41c], eax
je 0x401e41
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov dword [ebp - 0x428], eax
push dword [ebp - 0x420]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x401e5d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov dword [ebp - 0x428], esi
push 0x41
call edi
movzx eax, ax
mov edi, eax
test esi, esi
je 0x401f36
push 0x3a
mov dword [ebp - 0x420], eax
lea eax, [ebp - 0x470]
push 0
push eax
call fcn.0040d270
add esp, 0xc
xor esi, esi
nop dword [eax]
test esi, esi
jne 0x401eaa
mov ax, word [esi*2 + 0x424018]
xor ax, di
mov word [ebp + esi*2 - 0x470], ax
inc esi
jmp 0x401e90
mov ecx, dword [ebp - 0x420]
lea edx, [esi - 1]
call fcn.00402c50
imul ecx, eax, 0x19660d
mov ax, word [esi*2 + 0x424018]
add ecx, 0x3c6ef35f
xor ax, cx
mov word [ebp + esi*2 - 0x470], ax
inc esi
cmp esi, 0x1d
jb 0x401e90
movaps xmm0, xmmword [ebp - 0x470]
mov ax, word [ebp - 0x438]
push dword [ebp - 0x428]
movaps xmmword [ebp - 0x4e0], xmm0
movaps xmm0, xmmword [ebp - 0x460]
movaps xmmword [ebp - 0x4d0], xmm0
movaps xmm0, xmmword [ebp - 0x450]
movaps xmmword [ebp - 0x4c0], xmm0
movq xmm0, qword [ebp - 0x440]
mov word [ebp - 0x4a8], ax
lea eax, [ebp - 0x4e0]
movq qword [ebp - 0x4b0], xmm0
jmp 0x40230e
xorps xmm0, xmm0
mov dword [ebp - 0x41c], eax
movaps xmmword [ebp - 0x450], xmm0
xor esi, esi
test esi, esi
jne 0x401f68
mov ax, word [esi*2 + 0x424008]
xor ax, di
mov word [ebp + esi*2 - 0x450], ax
inc esi
mov eax, dword [ebp - 0x41c]
jmp 0x401f48
lea edx, [esi - 1]
mov ecx, eax
call fcn.00402c50
imul ecx, eax, 0x19660d
mov ax, word [esi*2 + 0x424008]
add ecx, 0x3c6ef35f
xor ax, cx
mov word [ebp + esi*2 - 0x450], ax
inc esi
mov eax, dword [ebp - 0x41c]
cmp esi, 8
jb 0x401f48
movaps xmm0, xmmword [ebp - 0x450]
lea eax, [ebp - 0x4a0]
push 0x800
push 0
push eax
movaps xmmword [ebp - 0x4a0], xmm0
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov dword [ebp - 0x424], eax
test eax, eax
jne 0x402017
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x420], eax
mov eax, dword [sym.imp.USER32.dll_CharLowerW]
push 0x41
call eax
movzx edx, ax
mov ecx, 0x423fb8
lea eax, [ebp - 0x4f8]
push eax
call fcn.00402490
mov esi, eax
lea edi, [ebp - 0x488]
mov ecx, 0x13
lea eax, [ebp - 0x488]
rep movsd dword es:[edi], dword [esi]
add esp, 4
movsw word es:[edi], word [esi]
push dword [ebp - 0x420]
jmp 0x40230e
mov edi, dword [sym.imp.USER32.dll_CharLowerW]
push 0x41
call edi
movzx ecx, ax
xorps xmm0, xmm0
mov dword [ebp - 0x420], ecx
xor esi, esi
movq qword [ebp - 0x4b8], xmm0
mov dword [ebp - 0x4b0], 0
mov word [ebp - 0x4ac], 0
nop word [eax + eax]
test esi, esi
jne 0x402066
mov al, byte [esi + 0x423fa4]
xor al, cl
mov byte [ebp + esi - 0x4b8], al
inc esi
jmp 0x402050
lea edx, [esi - 1]
call fcn.00402c50
imul ecx, eax, 0x19660d
mov al, byte [esi + 0x423fa4]
add ecx, 0x3c6ef35f
xor al, cl
mov ecx, dword [ebp - 0x420]
mov byte [ebp + esi - 0x4b8], al
inc esi
cmp esi, 0xe
jb 0x402050
mov eax, dword [ebp - 0x4b0]
movq xmm0, qword [ebp - 0x4b8]
mov dword [ebp - 0x43c], eax
mov ax, word [ebp - 0x4ac]
mov word [ebp - 0x438], ax
lea eax, [ebp - 0x444]
push eax
push dword [ebp - 0x424]
movq qword [ebp - 0x444], xmm0
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
test esi, esi
jne 0x40211f
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x41
mov dword [ebp - 0x420], eax
call edi
movzx edx, ax
mov ecx, 0x423f48
lea eax, [ebp - 0x500]
push eax
call fcn.00401870
add esp, 4
lea edi, [ebp - 0x490]
mov esi, eax
mov ecx, 0x17
rep movsd dword es:[edi], dword [esi]
push dword [ebp - 0x420]
lea eax, [ebp - 0x490]
jmp 0x40230e
push 0x41
call edi
movzx edx, ax
mov ecx, 0x423f38
lea eax, [ebp - 0x4b0]
push eax
call fcn.00402420
add esp, 4
movq xmm0, qword [eax]
push 1
push 0
movq qword [ebp - 0x49c], xmm0
mov ax, word [eax + 8]
mov word [ebp - 0x494], ax
lea eax, [ebp - 0x210]
push 0
push eax
lea eax, [ebp - 0x49c]
push eax
push 0
call esi
mov esi, eax
cmp esi, 0x20
ja 0x4021cb
push 0x41
call edi
movzx edx, ax
mov ecx, 0x423f00
lea eax, [ebp - 0x4e0]
push eax
call fcn.00402500
add esp, 4
movups xmm0, xmmword [eax]
push esi
movups xmmword [ebp - 0x470], xmm0
movups xmm0, xmmword [eax + 0x10]
movups xmmword [ebp - 0x460], xmm0
movups xmm0, xmmword [eax + 0x20]
movups xmmword [ebp - 0x450], xmm0
mov ecx, dword [eax + 0x30]
mov dword [ebp - 0x440], ecx
mov ax, word [eax + 0x34]
mov word [ebp - 0x43c], ax
lea eax, [ebp - 0x470]
jmp 0x40230e
xor eax, eax
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040b474
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov eax, dword [sym.imp.USER32.dll_CharLowerW]
push 0x41
call eax
movzx edx, ax
mov ecx, 0x424060
lea eax, [ebp - 0x4e8]
push eax
call fcn.004018e0
add esp, 4
movups xmm0, xmmword [eax]
push esi
movups xmmword [ebp - 0x480], xmm0
movups xmm0, xmmword [eax + 0x10]
movups xmmword [ebp - 0x470], xmm0
movups xmm0, xmmword [eax + 0x20]
movups xmmword [ebp - 0x460], xmm0
movq xmm0, qword [eax + 0x30]
movq qword [ebp - 0x450], xmm0
mov ecx, dword [eax + 0x38]
mov dword [ebp - 0x448], ecx
mov ax, word [eax + 0x3c]
mov word [ebp - 0x444], ax
lea eax, [ebp - 0x480]
jmp 0x40230e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x41
mov dword [ebp - 0x424], eax
call dword [sym.imp.USER32.dll_CharLowerW]
movzx ecx, ax
lea eax, [ebp - 0x470]
push 0x34
push 0
push eax
mov edi, ecx
call fcn.0040d270
add esp, 0xc
xor esi, esi
test esi, esi
jne 0x40229d
mov ax, word [esi*2 + 0x4240f8]
xor ax, di
mov word [ebp + esi*2 - 0x470], ax
inc esi
jmp 0x402283
lea edx, [esi - 1]
mov ecx, edi
call fcn.00402c50
imul ecx, eax, 0x19660d
mov ax, word [esi*2 + 0x4240f8]
add ecx, 0x3c6ef35f
xor ax, cx
mov word [ebp + esi*2 - 0x470], ax
inc esi
cmp esi, 0x1a
jb 0x402283
movaps xmm0, xmmword [ebp - 0x470]
mov eax, dword [ebp - 0x440]
push dword [ebp - 0x424]
movaps xmmword [ebp - 0x4e0], xmm0
movaps xmm0, xmmword [ebp - 0x460]
movaps xmmword [ebp - 0x4d0], xmm0
movaps xmm0, xmmword [ebp - 0x450]
mov dword [ebp - 0x4b0], eax
lea eax, [ebp - 0x4e0]
movaps xmmword [ebp - 0x4c0], xmm0
push eax
push 0x10
push str.Error
push 0
call fcn.00401190
mov ecx, dword [ebp - 4]
add esp, 0x14
xor ecx, ebp
pop edi
pop esi
call fcn.0040b474
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret