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

Disassembly:
sub esp, 0x44
mov eax, dword [0x4895f0]
xor eax, esp
mov dword [esp + 0x40], eax
mov eax, dword [str.SAFEBOOTREPAIR_DAT]
mov edx, dword [0x46b0d4]
mov dword [esp + 8], ecx
mov ecx, dword [0x46b0d0]
push ebx
push esi
mov dword [esp + 0x1c], ecx
mov cx, word [0x46b0dc]
push edi
mov word [esp + 0x2c], cx
mov ecx, 6
mov esi, 0x46b0b0
lea edi, [esp + 0x30]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
xor ebx, ebx
mov dword [esp + 0x1c], eax
mov eax, dword [0x46b0d8]
mov dword [esp + 0x24], edx
mov dl, byte [0x46b0de]
push ebx
mov dword [esp + 0x14], ebx
mov dword [esp + 0x2c], eax
mov byte [esp + 0x32], dl
mov dword [esp + 0x1c], ebx
movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov esi, eax
cmp esi, ebx
je 0x41007e
cmp dword [esp + 0x54], ebx
jne 0x40fee1
lea eax, [esp + 0x1c]
push eax
push 0xbc
jmp 0x40feeb
lea ecx, [esp + 0x1c]
push ecx
push 0xbd
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov edi, eax
cmp edi, ebx
je 0x41007e
push edi
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, ebx
je 0x41007e
push ebp
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov ebp, eax
cmp ebp, ebx
je 0x41007d
push edi
push esi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ebx, eax
test ebx, ebx
je 0x41007d
cmp ebx, 0x400
jb 0x41007d
push ebx
call fcn.004282da
mov edi, eax
add esp, 4
test edi, edi
mov dword [esp + 0x10], edi
je 0x41007d
push ebx
push ebp
push edi
call fcn.0044d2f0
mov ebp, dword [esp + 0x24]
push 0x400
add ebp, 0xc
push 0
push ebp
call fcn.0044cf00
add esp, 0x18
push ebp
push 0x400
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
test eax, eax
jne 0x40ff97
push 0x400
push 0
push ebp
call fcn.0044cf00
add esp, 0xc
jmp 0x410074
mov eax, ebp
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x40ffa0
sub eax, edx
mov edx, eax
cmp edx, 4
jl 0x40ff82
lea eax, [esp + 0x34]
lea esi, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x40ffc0
sub eax, esi
add eax, edx
cmp eax, 0x400
jae 0x40ff82
mov eax, dword [esp + 0x18]
cmp byte [eax + edx + 0xb], 0x5c
jne 0x40ffe3
mov byte [eax + edx + 0xb], cl
lea eax, [esp + 0x34]
mov ecx, eax
lea esp, [esp]
mov dl, byte [eax]
add eax, 1
test dl, dl
jne 0x40fff0
mov edi, ebp
sub eax, ecx
mov esi, ecx
add edi, 0xffffffff
mov cl, byte [edi + 1]
add edi, 1
test cl, cl
jne 0x410002
mov ecx, eax
shr ecx, 2
push 0
rep movsd dword es:[edi], dword [esi]
push 0
push 2
push 0
push 0
mov ecx, eax
push 0x40000000
and ecx, 3
push ebp
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x410049
push 0x400
push 0
push ebp
call fcn.0044cf00
add esp, 0xc
jmp 0x410070
mov eax, dword [esp + 0x10]
push 0
lea edx, [esp + 0x20]
push edx
push ebx
push eax
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x410069
mov dword [esp + 0x14], 1
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [esp + 0x10]
push edi
call fcn.004282df
add esp, 4
pop ebp
mov ecx, dword [esp + 0x4c]
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0044ce74
add esp, 0x44
ret 4