Function at 0x40cbd0
Capabilities:
Extract resource via kernel32 functions
Identify system language via api

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5387f7
mov eax, dword fs:[0]
push eax
sub esp, 0x14
push ebx
push esi
push edi
mov eax, dword [0x58d140]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, dword [ebp + 8]
xor edi, edi
mov dword [ebp - 0x18], edi
mov esi, 1
mov dword [ebp - 4], esi
call fcn.0040e25e
xor ecx, ecx
cmp eax, edi
setne cl
cmp ecx, edi
jne 0x40cc22
push 0x80004005
call fcn.00401670
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebx], eax
mov dword [ebp - 0x18], esi
call fcn.00420357
mov esi, dword [eax + 0xc]
push 0x10
push 1
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
cmp eax, edi
je 0x40ce24
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, edi
je 0x40ce24
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
cmp esi, edi
je 0x40ce24
test byte [0x59527c], 1
mov dword [ebp - 0x10], edi
jne 0x40cca6
or dword [0x59527c], 1
push 0x56af04
mov ecx, 0x595278
mov byte [ebp - 4], 2
call fcn.00405e40
push 0x53a7e0
call fcn.0050f95c
add esp, 4
mov byte [ebp - 4], 1
push str.VarFileInfoTranslation
push 0x595178
call fcn.0050f973
mov eax, dword [0x595278]
mov edi, dword [sym.imp.VERSION.dll_VerQueryValueW]
add esp, 8
lea ecx, [ebp - 0x14]
push ecx
lea edx, [ebp - 0x10]
push edx
push eax
push esi
call edi
test eax, eax
je 0x40cd5a
cmp dword [ebp - 0x14], 4
jne 0x40cd5a
mov ecx, dword [ebp - 0x10]
mov eax, dword [ecx]
mov edx, eax
shr edx, 0x10
and edx, 0xff
push edx
mov ecx, eax
movzx edx, al
shr ecx, 0x18
push ecx
push edx
shr eax, 8
and eax, 0xff
push eax
push str.StringFileInfo_02X_02X_02X_02X_
push 0x595178
call fcn.0050f973
add esp, 0x18
push 0x595178
lea ecx, [ebp - 0x20]
call fcn.004057d0
lea ecx, [ebp + 0xc]
push ecx
push eax
lea edx, [ebp - 0x1c]
push edx
mov byte [ebp - 4], 3
call fcn.00403070
add esp, 0xc
push eax
mov ecx, 0x595278
mov byte [ebp - 4], 4
call fcn.00401600
lea ecx, [ebp - 0x1c]
call fcn.004016e0
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], 1
call fcn.004016e0
jmp 0x40cd7a
mov eax, dword [ebp + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_GetUserDefaultLangID]
movzx ecx, ax
push ecx
push str.StringFileInfo_04X04B0_s
push 0x595178
call fcn.0050f973
add esp, 0x10
mov ecx, dword [0x595278]
lea edx, [ebp - 0x14]
push edx
lea eax, [ebp - 0x10]
push eax
push ecx
push esi
call edi
test eax, eax
je 0x40ce24
mov edx, dword [ebp - 0x14]
lea eax, [edx + edx]
xor esi, esi
test eax, eax
je 0x40ce24
mov ecx, dword [ebp - 0x10]
lea edx, [esi + ecx]
push edx
lea ecx, [ebp - 0x1c]
call fcn.004057d0
push eax
lea eax, [ebp - 0x20]
push ebx
push eax
mov byte [ebp - 4], 5
call fcn.00403070
add esp, 0xc
push eax
mov ecx, ebx
mov byte [ebp - 4], 6
call fcn.00401600
mov byte [ebp - 4], 5
mov eax, dword [ebp - 0x20]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40cdf4
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x1c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40ce17
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [ebp - 0x14]
add esi, 2
lea edx, [ecx + ecx]
cmp esi, edx
jb 0x40cda4
push ebx
lea ecx, [ebp - 0x20]
call fcn.00405f00
mov ecx, dword [ebp + 0x10]
mov byte [ebp - 4], 7
mov eax, dword [ebp - 0x20]
mov esi, dword [ecx]
lea edi, [eax - 0x10]
sub esi, 0x10
cmp edi, esi
je 0x40ce8b
cmp dword [esi + 0xc], 0
jl 0x40ce81
mov edx, dword [edi]
cmp edx, dword [esi]
jne 0x40ce81
push edi
call fcn.00401590
mov dword [ebp - 0x1c], eax
add esp, 4
lea eax, [esi + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40ce74
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ebp + 0x10]
add ecx, 0x10
mov dword [edx], ecx
jmp 0x40ce8b
mov edx, dword [eax - 0xc]
push edx
push eax
call fcn.004014d0
mov byte [ebp - 4], 1
lea eax, [edi + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40cea8
mov ecx, dword [edi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push edi
call eax
mov byte [ebp - 4], 0
mov eax, dword [ebp + 0xc]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40cecb
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret